A Yeoman generator for the MeaningfulJS MEAN stack web framework.
MeaningfulJS is written and maintained by Scott Davis, author of the IBM developerWorks article series Mastering MEAN and the O'Reilly video Architecture of the MEAN Stack.
For more information on MeaningfulJS, see http://meaningfuljs.com.
Once you have NodeJS and Yeoman installed, you can install this generator with a quick:
$ npm install -g generator-meaningfuljs
To scaffold out a new MeaningfulJS application, type the following and answer a few simple questions:
$ mkdir myapp
$ cd myapp
$ yo meaningfuljs
===========================================
Hi! Welcome to the MeaningfulJS generator.
Your new project will be scaffolded out in the current directory:
/Users/scott/myapp
Current GitHub user:
Scott Davis <[email protected]>
===========================================
? What would you like to call your project? myapp
? How would you describe your project? My cool MEAN app
? What is your GitHub name <email>? Scott Davis <[email protected]>
You can also type the appName to bypass the initial question:
$ yo meaningfuljs myapp
Once your application is scaffolded out, you can add new components easily. Type the following:
$ yo meaningfuljs:component
===========================================
Hi! Welcome to the MeaningfulJS generator.
Your new component can be found here:
/Users/scott/myapp/src/client/components
===========================================
? What would you like to call your component? mycomponent
You can also type the componentName to bypass the initial question:
$ yo meaningfuljs:component mycomponent
I'll be the first to admit that typing yo meaningfuljs
is quite the typing exercise -- it makes my hands cramp up just thinking about it.
The following instructions assume you're using a BASH shell in OS X or Linux. Feel free to adjust them for Windows or other shells accordingly.
If you'd like to create a local shorter alias, first find out where all of your globally installed Node modules live:
$ which yo
/Users/scott/.nvm/v0.12.0/bin/yo
This won't give you the exact directory, but it'll get you in the right neighborhood. Since I'm using NVM, my global modules are in /Users/scott/.nvm/v0.12.0/lib/node_modules
.
If you're using an operating system that supports symlinks, type:
$ ln -s generator-meaningfuljs generator-m
Forever after, you can now type yo m
instead of the more verbose yo meaningfuljs
.