Skip to content

Instantly share code, notes, and snippets.

@ryuone
Created December 17, 2013 09:36
Show Gist options
  • Save ryuone/8002388 to your computer and use it in GitHub Desktop.
Save ryuone/8002388 to your computer and use it in GitHub Desktop.
'use strict'
module.exports = (grunt) ->
require('time-grunt')(grunt)
require('load-grunt-tasks')(grunt)
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
jshint:
all: ['src/**/*.js']
uglify:
debug:
src: 'src/js/app.js'
dest: 'dist/js/app-<%= pkg.version %>.js'
options: { beautify: true }
minified:
src: 'src/js/app.js'
dest: 'dist/js/app-<%= pkg.version %>.min.js'
options: { mangle: true, compress: true }
coffee:
compile:
options:
sourceMap: true
files:
'dist/coffee/app.js' : ['src/coffee/*.coffee']
clean: ['dist']
grunt.registerTask 'default', ['jshint', 'clean', 'coffee', 'uglify']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment