Skip to content

Basic gruntjs setup for compiling Sass, Coffeescript, minification, sourcemaps, concatenation.

Notifications You must be signed in to change notification settings

proximitybbdo/grunt-compile-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Grunt compile bootstrap

This is a basic Grunt setup for

  • Sass
  • Coffeescript
    • concatinated
    • sourcemaps
  • Javascript
    • minified
    • sourcemaps
  • Watch tasks

Directory setup

It assumes the following directory setup:

assets/
  js/
    *.js
  coffee/
    **/*.coffee
  img/
  fonts/
  css/
    *.sass
    *.css

Installation

Of course you need node.js. You start by installing the necessary node packages (defined in package.json).

$ npm install

Make sure you add the node_modules directory in your .gitignore. This will install the following packages:

  • grunt-contrib-coffee
  • grunt-contrib-compass
  • grunt-contrib-watch
  • grunt-jsmin-sourcemap
  • grunt-contrib-jshint

Commands

Start the default task:

$ grunt

Start the watch task for the coffeescripts:

$ grunt watch:app

Start the watch task for the sass files:

$ grunt watch:sass

Resulting files

It produces the following files:

assets/
	js/
		main.js
		main.js.map
		main.map
		main.min.js

You can include the main.min.js in production or main.js for development purposes.

Sourcemaps

The source maps allow you to debug the original javascript / Coffeescript files in your browser (use Chrome! if you don't already).

See for more information.

About

Basic gruntjs setup for compiling Sass, Coffeescript, minification, sourcemaps, concatenation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published