generator-mt-boilerplate
v0.1.4
Published
Yeoman generator
Downloads
12
Readme
The Medtelligent Boilerplate
The Medtelligent boilerplate uses a collection of command line tools to ease the front-end development process:
Together, these tools allow us to generate new instances of the boilerplate, quickly access dependencies (jQuery), use Handlebars for partial management, and automate build tasks, like compiling SCSS.
Getting Started
The boilerplate relies heavily on npm, Node Package Manger, so you'll need to ensure you have Node installed. If you're on a Mac, the following command will tell you if you have node:
which node
If you're on a Windows, run:
where node
If nothing was returned, you don't have Node. Install it: Download Node
Generating the Boilerplate
Now that Node is installed, we can start to use Yeoman. If you haven't installed Yeoman before, run the following command:
npm install -g yo
The -g flag tells npm to do a global install, so you won't have to do this again.
With Yeoman (yo) installed, we're ready to install the Medtelligent boilerplate generator. To do so, run the following command.
npm install -g generator-mt-boilerplate
Now, ensure that your in the directory where you want to generate the boilerplate. Initiate the generator:
yo mt-boilerplate
Using the Boilerplate
A newly generated boilerplate returns a suite of tools that help ease the development process. Namely, Bower and Grunt.
Bower
Bower allows us to use the command line to fetch dependencies. New dependencies are added to the src/assets/vendor folder.
See Bower to learn how to install dependencies.
Note: always use the --save-dev flag to write new dependencies to your bower.json file. For more on the bower.json file, see bower.json
Grunt
Grunt is a task runner that handles all those tedious tasks that are better automated. If you've never installed Grunt, you'll need to do so: Install Grunt
The boilerplate includes the following Grunt tasks.
- grunt-contrib-sass - for compiling SCSS
- grunt-contrib-copy - for copying files/folders
- grunt-contrib-watch - runs Grunt when files have changed
- grunt-autoprefixer - auto-prefixes CSS; say goodbye to vendor prefixes!
- assemble - for static includes and partial management
In the event that you need more out of Grunt, use the command line to install new Grunt tasks. Be sure to use the --save-dev flag to write dependencies to package.json.
License
MIT