React Plume project archetypes that enables to create React with TypeScript projects with dependency injection and the observable pattern to manage the application global state.
Create a new project in the current folder with:
- Yarn (more reliable):
yarn dlx create-plume-react-project --template admin --projectName admin-vel
- Or with NPX:
npx create-plume-react-project@latest --template admin --projectName admin-vel
Once project is created, it can be started with:
yarn
to resolve dependenciesyarn start
to start the project
Options are passed using this syntax: npx create-plume-react-project@latest --[optionName] [value]
So the template
option can be used like this: npx create-plume-react-project@latest --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 |
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: npx create-plume-react-project@latest --template admin --projectName admin-vel
This @latest
is important, else an older cached version of the CLI can be used by NPM,
see npm/cli#2329 for details.
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.
- 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