This repository was archived by the owner on Nov 27, 2023. It is now read-only.
File tree 3 files changed +111
-110
lines changed
3 files changed +111
-110
lines changed Original file line number Diff line number Diff line change @@ -4,20 +4,23 @@ var meow = require('meow');
4
4
5
5
const cli = meow ( `
6
6
Usage
7
- $ react2dts [--module-name <name> | --top-level-module] [--react-import <name>]
7
+ $ react2dts [--module-name <name> | --top-level-module] [--react-import <name>] [--file <path>]
8
8
9
9
react2dts reads from stdin to process a file.
10
10
11
11
Options
12
12
--module-name, --name name of the module to create
13
13
--top-level-module if the created module should live in top-level
14
14
--react-import name of the react-like library to import (default to react)
15
+ --file the file to process instead of reading from stdin
15
16
16
17
Examples
17
18
$ cat <some/react/component.jsx> |react2dts --module-name module-name
18
19
19
20
$ cat <some/react/component.jsx> |react2dts --top-level-module
20
- ` , {
21
+
22
+ $ react2dts --top-level-module --file <some/react/component.jsx>
23
+ ` , {
21
24
flags : {
22
25
'module-name' : {
23
26
type : 'string' ,
@@ -29,6 +32,9 @@ const cli = meow(`
29
32
'react-import' : {
30
33
type : 'string' ,
31
34
default : 'react'
35
+ } ,
36
+ 'file' : {
37
+ type : 'string'
32
38
}
33
39
}
34
40
} ) ;
You can’t perform that action at this time.
0 commit comments