This repository was archived by the owner on Nov 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +111
-110
lines changed Expand file tree Collapse file tree 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');
44
55const cli = meow ( `
66 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>]
88
99 react2dts reads from stdin to process a file.
1010
1111 Options
1212 --module-name, --name name of the module to create
1313 --top-level-module if the created module should live in top-level
1414 --react-import name of the react-like library to import (default to react)
15+ --file the file to process instead of reading from stdin
1516
1617 Examples
1718 $ cat <some/react/component.jsx> |react2dts --module-name module-name
1819
1920 $ cat <some/react/component.jsx> |react2dts --top-level-module
20- ` , {
21+
22+ $ react2dts --top-level-module --file <some/react/component.jsx>
23+ ` , {
2124 flags : {
2225 'module-name' : {
2326 type : 'string' ,
@@ -29,6 +32,9 @@ const cli = meow(`
2932 'react-import' : {
3033 type : 'string' ,
3134 default : 'react'
35+ } ,
36+ 'file' : {
37+ type : 'string'
3238 }
3339 }
3440} ) ;
You can’t perform that action at this time.
0 commit comments