File tree Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,36 @@ Install with [npm](https://www.npmjs.com/):
12
12
13
13
## Usage
14
14
15
+ ### CLI
16
+
17
+ ```
18
+ $ npm i -g technological-book-corpus-ja
19
+ $ technological-book-corpus-ja
20
+ /Users/technological-book-corpus-jasource/js-primer/array/README.md
21
+ /Users/technological-book-corpus-ja/source/js-primer/comments/README.md
22
+ /Users/technological-book-corpus-ja/source/js-primer/condition/README.md
23
+ /Users/technological-book-corpus-ja/source/js-primer/data-type/README.md
24
+ /Users/technological-book-corpus-ja/source/js-primer/function-method/README.md
25
+ /Users/technological-book-corpus-ja/source/js-primer/implicit-coercion/README.md
26
+ /Users/technological-book-corpus-ja/source/js-primer/introduction/README.md
27
+ /Users/technological-book-corpus-ja/source/js-primer/loop/README.md
28
+ /Users/technological-book-corpus-ja/source/js-primer/object/README.md
29
+ /Users/technological-book-corpus-ja/source/js-primer/operator/README.md
30
+ /Users/technological-book-corpus-ja/source/js-primer/read-eval-print/README.md
31
+ /Users/technological-book-corpus-ja/source/js-primer/README.md
32
+ /Users/technological-book-corpus-ja/source/js-primer/statement-expression/README.md
33
+ /Users/technological-book-corpus-ja/source/js-primer/string/README.md
34
+ /Users/technological-book-corpus-ja/source/js-primer/variables/README.md
35
+ ```
36
+
37
+ パターンでの絞り込みもできます。
38
+
39
+ ```
40
+ $ technological-book-corpus-ja "/**/js-primer/**/*.md"
41
+ ```
42
+
43
+ ### Node.js
44
+
15
45
``` js
16
46
const References = {
17
47
" JavaScript-Plugin-Architecture" : {
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+ const get = require ( '../' ) . get ;
3
+ const findByPattern = require ( '../' ) . findByPattern ;
4
+ if ( process . argv [ 2 ] ) {
5
+ console . log ( findByPattern ( process . argv [ 2 ] ) . join ( "\n" ) ) ;
6
+ } else {
7
+ console . log ( get ( ) . join ( "\n" ) ) ;
8
+ }
Original file line number Diff line number Diff line change 12
12
"name" : " technological-book-corpus-ja" ,
13
13
"version" : " 1.0.0" ,
14
14
"description" : " 日本語で書かれた技術書のコーパス" ,
15
- "main" : " lib/technological-book-corpus-ja.js" ,
15
+ "main" : " lib/index.js" ,
16
+ "bin" : {
17
+ "technological-book-corpus-ja.js" : " ./bin/technological-book-corpus-ja.js"
18
+ },
16
19
"scripts" : {
17
20
"build" : " node build.js" ,
18
21
"update-refs" : " git submodule foreach git pull" ,
You can’t perform that action at this time.
0 commit comments