README
Create Plume React Project
React Plume project archetypes.
Usage
Create a new project in the current folder with: npm init plume-react-project --template admin --projectName admin-vel
Once project is created, it can be started with:
yarn
to resolve dependenciesyarn start
to start the project
Options
Options are passed using this syntax: npm init plume-react-project --[optionName] [value]
So the template
option can be used like this: npm init plume-react-project --template admin
Name | Default value | Available values | Description |
---|---|---|---|
template | front | front, admin | The template to use |
projectName | my-project | Any string value | The project name is used for in package.json and index.html files |
verbose | false | true, false | True to display extra debug information during processing |
targetDirectory | Current directory | Any valid absolute path | The path in which the project will be initialized with the template |
templateDirectory | The build/templates directory of the create cli | Any valid absolute path | The path in which templates will be used |
Development
To set up the development environment to work on this create cli:
- run
yarn
- run
yarn build
- run
npm link
Then it is possible to open a new terminal anywhere on the local computer and run: npm init plume-react-project --template admin --projectName admin-vel
To test new changes, yarn build
should be run.
Templates are fully working projects, so modifications in the templates should be tested at least by running the modified templates.
TODO
- Propose a command line interface using
enquirer
to ask the user to set interactively the options - Propose module options for the front template like
i18n
,material
,form
,session
- Use
chalk
instead of doing terminal coloration by hand - Use
execa
orpkg-install
to directly install the project