A starter kit for client-side web development. The stack includes:
grunt
- workflow automationrequire.js
- dependency managementjQuery
- DOM manipulationlodash
- helpful functionalityBackbone
- application structureHandlebars
- JavaScript templatingLESS
- CSS language
-
Modify the following files:
component.json
- Bower DependenciesGruntfile.coffee
- Grunt Build Configurationpackage.json
- NPM Dependencies
-
Install the NPM Packages.
npm install
-
Install the Bower Packages.
bower install
-
Build the project in development mode.
grunt develop
-
Launch the web browser to: http://127.0.0.1:8000/
The directory structure is setup in 2 phases: pre-compiled + post-compiled. The directories for these are src
and dist
, respectively.
.
├── component.json - Bower Dependencies
├── Gruntfile.coffee - Grunt Configuration
├── package.json - NPM Dependencies
├── README.md - this file
├── dist - Distribution - the built project
├── docs - Documentation
├── src
│ ├── index.html - HTML files can live here
│ ├── assets - project assets: images, fonts, etc.
│ │ └── images
│ ├── coffee - CoffeeScript Code
│ │ ├── build.coffee - Require.js Configuration
│ │ └── main.coffee - Application Endpoint
│ ├── css - CSS Code
│ ├── js - JS Code
│ ├── less - LESS Code
│ │ ├── _imported.less - Exclude '_' prefixed files
│ │ └── app.less
│ └── templates - Handlebar Templates
├── test - Tests
└── plugins - Bower Install Directory
The build process does the following
- Wipes the
dist
directory. - Copies over files from the
bower
dependencies in theplugins
directory. - Copies over non-compilable code from
src
. This includes:- Javascript files from
src/js
. - CSS files from
src/css
. - All assets from
src/assets
. - Any file in
src
.
- Javascript files from
- Compiles the CoffeeScript, Handlebars, and LESS files from
src
todist
.
- Compile the CoffeeScript files in
src/coffee/**/*.coffee
. - Compile the Handlebars files in
src/templates/**/*.handlebars
. - Compile the LESS files in
src/less/**/*.less
.
- Erase the
dist
folder - Copy over the files that won't be compiled from
src
todist
. - Copy over the
plugins
todist
. - Compiles everything using
compile-all
- Start a
connect
server. The URL is: http://127.0.0.1:8000/ watch
for changes to copy/recompile to updatedist
.