Yeoman generator
Trick question. It's not a thing. It's this guy:
Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.
Not every new computer comes with a Yeoman pre-installed. He lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive. Make sure you clean up, he likes new and shiny things.
npm install -g yo
Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.
To install generator-glu from npm, run:
npm install -g generator-glu
This command will bootstrap the current directory for GLU project...
yo glu
Note: If you didn't use yo glu
command to bootstrap your project, you have to place the .yo-rc.json
file with the following content
{
"generator-glu": {}
}
in the project root directory, in order for subgenerators to work properly.
yo glu:action name
Executing the command will create the following files:
create src/actions/NameActions.js
create src/actions/NameActionCreator.js
yo glu:api name
Executing the command will create the following files:
create src/apis/NameApi.js
yo glu:component name
Executing the command will create the following files:
create src/components/name/NameView.js
create src/components/name/NameViewController.js
create src/components/name/NameViewEvents.js
yo glu:reactcomponent name
Executing the command will create the following files:
create src/components/name/NameView.js
create src/components/name/NameViewController.js
create src/components/name/NameViewEvents.js
create src/components/name/NameViewReact.js
yo glu:page name
Executing the command will create the following files:
create src/pages/name/NameView.js
create src/pages/name/NameViewController.js
yo glu:store name
Executing the command will create the following files:
create src/stores/NameStore.js
yo glu:view name
Executing the command will create the following files:
create NameView.js
yo glu:reactview name
Executing the command will create the following files:
create NameViewReact.js
yo glu:viewcontroller name
Executing the command will create the following files:
create NameViewController.js
yo glu:viewevents name
Executing the command will create the following files:
create NameViewEvents.js
MIT