Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #15 from rwl-dev/update-env
Browse files Browse the repository at this point in the history
Update env
  • Loading branch information
windchime-yk authored Aug 24, 2022
2 parents 2d34b50 + c9ee500 commit ac8972a
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
with:
deno-version: v1.x
- name: Test
run: deno test --allow-write --allow-read
run: deno task test
- name: Lint
run: deno lint --unstable
run: deno lint
- name: Format Check
run: deno fmt --check --ignore=README.md,README_JP.md,./.github/
run: deno task fmt --check
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DB module in JSON format created with Deno.
- [x] Asynchronous support
- [x] Partial search with regular expressions

If you don't see a feature you think you need, please let us know what you want in [Issue](https://github.com/windchime-yk/bracesdb/issues/new). It will be used as a reference for implementation.
If you don't see a feature you think you need, please let us know what you want in [Issue](https://github.com/rwl-dev/bracesdb/issues/new). It will be used as a reference for implementation.

## API
When creating a file, you must add `--allow-read` and `--allow-write` at execution to read and write the file.
Expand All @@ -32,7 +32,7 @@ When creating a file, you must add `--allow-read` and `--allow-write` at executi
`filename` is the DB name. Default name is `main`.

``` typescript
import { BracesDB } from "https://deno.land/x/bracesdb/mod.ts";
import { BracesDB } from "https://deno.land/x/bracesdb@<version>/mod.ts";

interface DB {
name?: string;
Expand Down Expand Up @@ -80,13 +80,10 @@ const dataAll = db.find();
### Test
Execute the following command.
``` bash
$ git clone git@github.com:windchime-yk/bracesdb.git
$ git clone https://github.com/rwl-dev/bracesdb.git
$ cd path/to/bracesdb

# If there is no Denon
$ deno test --allow-write --allow-read
# If you have a Denon
$ denon test
$ deno task test
```

## On translation
Expand Down
11 changes: 4 additions & 7 deletions README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Denoで作られたJSON形式のDBモジュール。
- [x] 非同期対応
- [x] 正規表現による部分検索

もし必要だと思う機能がなければ、[Issues](https://github.com/windchime-yk/bracesdb/issues/new)で教えてください。参考にします。
もし必要だと思う機能がなければ、[Issues](https://github.com/rwl-dev/bracesdb/issues/new)で教えてください。参考にします。

## API
ファイルを作成する保存形式では、ファイルの読み込みと書き込みを行なうため、実行の際に`--allow-read``--allow-write`をつけてください。
Expand All @@ -31,7 +31,7 @@ Denoで作られたJSON形式のDBモジュール。
`folder`はDBファイルを格納するフォルダのパスです。デフォルトではプロジェクトルートに生成されます。
`filename`はDBファイルの名前です。デフォルトは`main`です。
``` typescript
import { BracesDB } from "https://deno.land/x/bracesdb/mod.ts";
import { BracesDB } from "https://deno.land/x/bracesdb@<version>/mod.ts";

interface DB {
name?: string;
Expand Down Expand Up @@ -80,11 +80,8 @@ const dataAll = db.find();
## テスト
以下のコマンドを実行してください。
``` bash
$ git clone git@github.com:windchime-yk/bracesdb.git
$ git clone https://github.com/rwl-dev/bracesdb.git
$ cd path/to/bracesdb

# Denonがない場合
$ deno test --allow-write --allow-read
# Denonがある場合
$ denon test
$ deno task test
```
6 changes: 6 additions & 0 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tasks": {
"test": "deno test --allow-write --allow-read",
"fmt": "deno fmt --ignore=README.md,README_JP.md,./.github/,.vscode/"
}
}
2 changes: 1 addition & 1 deletion mod.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.117.0/testing/asserts.ts";
import { BracesDB } from "./mod.ts";

interface Test {
Expand Down
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
readFileSync,
writeFile,
writeFileSync,
} from "https://github.com/windchime-yk/deno-util/raw/v0.0.1/modules/file.ts";
} from "https://pax.deno.dev/windchime-yk/deno-util@v1.6.0/file.ts";

export interface BracesDBOption {
/**
Expand Down
17 changes: 0 additions & 17 deletions scripts.config.ts

This file was deleted.

0 comments on commit ac8972a

Please sign in to comment.