npm install yo generator-supermind --global
mkdir awesome-project
cd awesome-project
yo supermind
yo supermind:linting
yo supermind:packager
yo supermind:component component-name
yo supermind:container container-name
yo supermind:route route-name
yo supermind:state state-name
git clone https://github.com/supermind-hq/generator-supermind
cd generator-supermind
We use yarn to manage our project dependencies. To install yarn:
npm install yarn --global
Next install the project dependencies with yarn:
yarn install
To make the generator available globally on your system run:
yarn link
Open up a new terminal window and create a dummy project somewhere else on your system:
mkdir ~/Desktop/dummy-project
Link generator-supermind
within the dummy project:
cd ~/Desktop/dummy-project
yarn link generator-supermind
To test the generator is linked and working, run some yo
commands from within the dummy project:
yo supermind // Generates the Supermind boilerplate
yo supermind:state // Generates a new Redux state node
From within the generator-supermind
terminal window run:
yarn run watch
Any changes you make to generator-supermind
will be immediately available to all linked projects (so running yo supermind
again in the dummy-project
will apply the latest changes you've made to generator-supermind/source
).
The generators
directory in generator-supermind
represents the compiled generator code that is deployed to npm
, but not committed to git
.