Advertisement
Guest User

Untitled

a guest
Oct 1st, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.74 KB | None | 0 0
  1. module.exports = function(grunt) {
  2.  
  3.     grunt.initConfig({
  4.         concat: {
  5.             dist: {
  6.                 src: ['src/foo.js', 'src/bar.js'],
  7.                 dest: 'dist/output.js'
  8.             }
  9.         },
  10.         jshint: {
  11.             beforeconcat: ['src/foo.js', 'src/bar.js'],
  12.             afterconcat: ['dist/output.js']
  13.         },
  14.         sass: {                                  // Task
  15.             dist: {                              // Target
  16.                 options: {                       // Target options
  17.                     style: 'expanded'
  18.                 },
  19.                 files: {                         // Dictionary of files
  20.                     'css/calculator.css': 'css/calculator.scss'
  21.                 }
  22.             }
  23.         },
  24.         uglify: {
  25.             options: {
  26.                 mangle: false
  27.             },
  28.             my_target: {
  29.                 files: {
  30.                     'dest/output.min.js': ['src/input.js']
  31.                 }
  32.             }
  33.         },
  34.         cssmin: {
  35.             options: {
  36.                 shorthandCompacting: false,
  37.                 roundingPrecision: -1
  38.             },
  39.             target: {
  40.                 files: {
  41.                     'output.css': ['foo.css', 'bar.css']
  42.                 }
  43.             }
  44.         },
  45.         watch: {
  46.             files: ['css/calculator.scss'],
  47.             tasks: ['sass']
  48.         }
  49.     });
  50.  
  51.     grunt.loadNpmTasks('grunt-contrib-concat');
  52.     grunt.loadNpmTasks('grunt-contrib-uglify');
  53.     grunt.loadNpmTasks('grunt-contrib-jshint');
  54.     grunt.loadNpmTasks('grunt-contrib-sass');
  55.     grunt.loadNpmTasks('grunt-contrib-cssmin');
  56.     grunt.loadNpmTasks('grunt-contrib-watch');
  57.  
  58.     grunt.registerTask('default', ['watch']);
  59.  
  60. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement