HTML5 starter kit for creating HTML5 applications and User Interfaces (UIs), intergrated with GULPJS for fast, clean and optimized web app creation.
It has all the necessary requirements to get anyone started in creating apps fast and easy.
START basically does the following:
- compiles your scripts, templates, styles (both transpilation and precompilation is taken care of here)
- lints them (checks for any syntax error)
- notifies you about errors via console and system notifications
- wraps the scripts and templates in common.js / AMD modules. (for build systems)
- concatenates scripts and styles
- generates source maps for concatenated files
- copies assets and static files the respective required project production directory
- shrinks the output by minifying code and optimizing images
- monitors/watches your files for changes and updates realtime wherever relevant, reloads to reflects the changes to the browser
- create a test and distribution/final versions of your app or UI without compromising the original code
Concatinates all CSS into app.full.css and JS into app.full.js or app.full.min.js after minification.
You will need to install some stuff, if you haven't already:
Majors:
- Node.js - Click here to install
Secondaries(click for further information):
- npm (installed together with node.js, usually bundled in it)
- gulpjs (part of the instructions below)
- bower
Once you have NodeJS installed, run_(type/copy paste int the command line window and press ENTER)_:
To download the boilerplate
$ git clone https://github.com/kn9ts/start-to-grunt name_of_your_project
After cloning/copying the boilerplate, please get into your project's directory/folder
$ cd name_of_your_project
To install Grunt-CLI (Command Line) plugin/tool
$ sudo npm install -g gulp
To install gulp/project dependecies
$ npm install
To install default project front-end assets/libraries eg. bootstrap, jQuery... NOTE: This downloads CSS and JavaScript libraries that usually default in most projects nowadays. They are downloaded into the bower_assets folder that can be referenced in the HTML you are editing as you would have with any CSS and JavaScript files in your project, only that this way we give your application a good structure and files separation.
$ bower install
Note: Each of the '$' (dollar) sign denotes a step (so steps 4 in total)
Note: You can skip STEP 2($ sudo npm install -g gulp) if you already did install the gulp command line plugin/tool in any prior project with or without any relation to this boilerplate
This will install all the things you need for running the gulp-tasks automatically.
Note: As stated prior. You need to have a running node.js and ruby along with npm. Please install this before setting up START in your project's directory. Ruby comes default in most systems nowadays so I believe you do have that already.
Now you can start developing your site. Therefore use the GruntJS default task (type in your Terminal and press ENTER):
$ gulp
This will create a dist folder with a distribution application css and js files. All your files should point to thhis ./dist folder for you custom coded files that are in './js' prior to compilation
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Version: 1.1.0
Copyright (c) 2014 Eugene Mutai Licensed under the MIT license