Skip to content

A yeoman generator that's really just one subgenerator - "entity"

License

Notifications You must be signed in to change notification settings

MartyIce/generator-meancrud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

generator-meancrud

A Yeoman generator that's really just one subgenerator - "entity". This will tie a new model type into the Mean.io stack, using the same conventions as the "Articles example" (https://github.com/linnovate/mean/blob/master/app/models/article.js, etc).

$ yo meancrud:entity 'ThingIWantToModel'

This will create the following files:

app\controllers\ThingIWantToModels.js app\models\ThingIWantToModels.js public\js\controllers\ThingIWantToModels.js public\js\services\ThingIWantToModels.js public\views\ThingIWantToModels\create.html public\views\ThingIWantToModels\edit.html public\views\ThingIWantToModels\list.html public\views\ThingIWantToModels\view.html

It will also add code to the following files to hook everything together (note, this is pretty fragile, dependent on the way the code currently looks in the mean.io stack above):

public\js\config.js public\js\app.js config\routes.js config\middlewares\authorization.js app\views\includes\foot.jade public\js\controllers\header.js

Getting Started

What is Yeoman?

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 Generators

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-meancrud from npm, run:

$ npm install -g generator-meancrud

Finally, initiate the generator:

$ yo meancrud

Getting To Know Yeoman

Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced.

If you'd like to get to know Yeoman better and meet some of his friends, Grunt and Bower, check out the complete Getting Started Guide.

License

MIT License

About

A yeoman generator that's really just one subgenerator - "entity"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published