Reactant CLI
We recommend that you use npx
to create Reactant projects.
npx reactant-cli
Create a Reactant project
npx reactant-cli init my-app
Use
-l <language>
or--language <language>
for specifying a language, supportjs
,ts
,javascript
, andtypescript
, the default istypescript
.Use
-t <type>
or--type <type>
for specifying a type app, supportweb
,shared-tab
, andshared-worker
, the default isweb
.
shared-tab
andshared-worker
are shared App project templates based onreactant-share
.
Generate files
Generate a service file
npx reactant-cli generate service FooBar
# or alias
npx reactant-cli g s FooBar
Generate a view file
npx reactant-cli generate view FooBarView
# or alias
npx reactant-cli g v FooBarView
- Use
-l <language>
or--language <language>
for specifying a language, supportjs
,ts
,javascript
, andtypescript
, the default istypescript
. - Use
-w
or--withTests
for creating tests files, the default is not creating tests files. - Use
-s <src>
or--src <src>
for specifying source files path in your project root path, the default issrc
.
It supports creating multiple files in any directory in the project using this command