0.9.3 • Published 3 years ago

react-juicy-cli v0.9.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-juicy-cli

This is a Node.js CLI for quickly generating React components!

Install

npm:

$ npm install -g react-juicy-cli

yarn:

$ yarn global add react-juicy-cli

Usage

With questionnaire

Just run

$ react-juicy-cli

and you will get questions about what your component should be.

With flags

You can provide flags to skip questionnaire and generate component in 1 line. Example:

$ react-juicy-cli --component TestComponent --typescript --scss --unit --enzyme --double-quotes --path path/to/directory

or

$ react-juicy-cli --cmp TestComponent --js --skip

Available flags

Don't worry if you miss a few flag, the CLI will ask you a question from a questionnaire about missing information.\ The only thing you should know is that the generator uses single quotes and the current directory by default, you will only get the quotes and path questions if no flags are specified.\ If you use arguments and want to swap quotes, use the --single-quotes (--sq) or --double-quotes (--dq) flags.\ If you use arguments and want to change path, use the --path (-p) flag.

Flags

flaginterfacedescription
--helpBooleandisplay help for react-juicy-cli
--versionBooleandisplay current version
--pathStringrelative path where to generate a Component/Context/Hook/Test (the current directory is used by default)
--componentStringspecify component name and tell CLI to generate a component
--contextStringspecify context name and tell CLI to generate a context
--hookStringspecify hook name and tell CLI to generate a hook
--testStringspecify test name and tell CLI to generate a test
--test-componentStringspecify test name and tell CLI to generate a test
--test-hookStringspecify test name and tell CLI to generate a test
--javascriptBooleangenerate JavaScript component
--typescriptBooleangenerate TypeScript component
--cssBooleangenerate CSS
--scssBooleangenerate SCSS
--sassBooleangenerate SASS
--lessBooleangenerate LESS
--enzymeBooleanuse enzyme
--testing-libraryBooleanuse React Testing Library
--unitBooleangenerate .spec file according to the extension of your component (tsx or jsx)
--integrationBooleangenerate .test file according to the extension of your component (tsx or jsx)
--skip-stylesBooleanskip styles step and generate component with tests
--skip-testsBooleanskip tests step and generate component with styles
--skipBooleanskip styles and tests and generate only component
--single-quotesBooleantell generator that you prefer single quotes (default)
--double-quotesBooleantell generator that you prefer double quotes

Aliases

aliasflag
-h--help
-v--version
-p--path
--cmp--component
--ctx--context
--hk--hook
--js--javascript
--ts--typescript
--enz--enzyme
--test-lib--testing-library
-u--unit
-i--integration
--skipS--skip-styles
--skipT--skip-tests
--t-cmp--test-component
--t-hk--test-hook
--sq--single-quotes
--dq--double-quotes

Alternatives

flagalternatives
--skip-styles--skip-style, --skipStyle, --skipStyles
--skip-tests--skip-test, --skipTest, --skipTests
--test-component--tCmp, --testCmp, --testComponent
--test-hook--tHk, --testHk, --testHook
--testing-library--testing-lib, --testingLib, --testingLibrary

Maintainers

License

MIT.

0.9.3

3 years ago

0.9.0

3 years ago

0.7.2

3 years ago

0.8.0

3 years ago

0.9.1

3 years ago

0.4.1

3 years ago

0.7.0

3 years ago

0.6.1

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.3.0

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.27

3 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.22

3 years ago

0.0.24

3 years ago

0.0.25

3 years ago

0.0.26

3 years ago

0.0.19

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago