create-react-blueprint
v0.1.7
Published
Command line tool to scaffold React blueprints and components
Downloads
31
Maintainers
Readme
create-react-blueprint
Command line helper for scaffolding React blueprints. Designed to be invoked through npm create react-blueprint (or npx create-react-blueprint).
Usage
From the root of your React project, run:
npm create react-blueprint component ButtonThis creates the following files:
src/components/Button/Button.tsx
src/components/Button/Button.module.css
src/components/Button/index.tsThe new component is generated from the templates in src/templates/component. Edit those files to customise the scaffold that is produced.
Template Tokens
The component scaffold supports the following template tokens:
{{ComponentName}}→ the PascalCased component name (e.g.Button){{componentName}}→ the camelCased variant (e.g.button)
You can safely add your own files to the template directory; any file ending with .tpl is rendered and written to the target folder, with ComponentName in the filename replaced by the provided name.
Local Development
node bin/create-react-blueprint.js --help
node bin/create-react-blueprint.js component SampleComponentThe CLI writes relative to the current working directory, so run it inside the project you want to scaffold.
