Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = (grunt)->
- grunt.initConfig
- pkg: grunt.file.readJSON('package.json')
- slim:
- dist:
- files:
- 'build/index.html': 'index.slim'
- 'build/templates/index.html': 'templates/index.slim'
- 'build/templates/form.html': 'templates/form.slim'
- 'build/templates/new.html': 'templates/new.slim'
- 'build/templates/edit.html': 'templates/edit.slim'
- sass:
- dist:
- options:
- cacheLocation: 'temp/sass-cache'
- files:
- 'build/css/style.css': ['assets/css/style.scss']
- coffee:
- compileWithMaps:
- options:
- sourceMap: true
- files:
- 'temp/js/app.js': [
- 'assets/js/app.coffee',
- 'assets/js/controllers/DataController.coffee' ]
- uglify:
- dist:
- options:
- sourceMap: true
- compress:
- drop_console: true
- files:
- 'temp/js/app.min.js': [ 'temp/js/app.js' ]
- concat:
- options:
- separator: '\n'
- app:
- src: [ 'node_modules/angular/angular.min.js',
- 'node_modules/angular-ui-router/release/angular-ui-router.min.js',
- 'temp/js/app.min.js' ]
- dest: 'build/js/app.min.js'
- watch:
- options:
- livereload: true
- gruntfile:
- files: 'Gruntfile.coffee'
- tasks: ['apply']
- scss:
- files: [ 'assets/css/style.scss' ]
- tasks: ['apply']
- slim:
- files: [ 'index.slim',
- 'templates/form.slim']
- tasks: ['apply']
- coffee:
- files: [ 'assets/js/app.coffee',
- 'assets/js/controllers/DataController.coffee']
- tasks: ['apply']
- grunt.loadNpmTasks 'grunt-slim'
- grunt.loadNpmTasks 'grunt-contrib-sass'
- grunt.loadNpmTasks 'grunt-contrib-coffee'
- grunt.loadNpmTasks 'grunt-contrib-uglify'
- grunt.loadNpmTasks 'grunt-contrib-concat'
- grunt.loadNpmTasks 'grunt-contrib-watch'
- grunt.loadNpmTasks 'grunt-newer'
- grunt.registerTask 'default', ['slim', 'sass', 'coffee', 'uglify', 'concat']
- grunt.registerTask 'apply', 'apply changes in code', ()->
- grunt.task.run 'newer:slim'
- grunt.task.run 'newer:sass'
- grunt.task.run 'newer:coffee'
- grunt.task.run 'newer:uglify'
- grunt.task.run 'newer:concat'
Advertisement
Add Comment
Please, Sign In to add comment