Skip to content

lucas-amiaud/create-plume-react-project

 
 

Repository files navigation

Create Plume React Project

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.

Usage

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:

  1. yarn to resolve dependencies
  2. yarn start to start the project

Options

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

Development

To set up the development environment to work on this create cli:

  1. run yarn
  2. run yarn build
  3. 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.

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 or pkg-install to directly install the project

About

CLI to create React frontend with Plume templates

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 85.5%
  • JavaScript 7.5%
  • SCSS 5.4%
  • Other 1.6%