Advertisement
Guest User

Untitled

a guest
Jan 8th, 2017
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. laptop:website lextoc$ cat Gruntfile.js
  2. 'use strict()';
  3.  
  4. module.exports = function(grunt) {
  5.  
  6. // Load grunt tasks automatically
  7. require('load-grunt-tasks')(grunt);
  8.  
  9. // Time how long tasks take. Can help when optimizing build times
  10. require('time-grunt')(grunt);
  11.  
  12. var options = {
  13. config: {
  14. src: './grunt/*.js'
  15. },
  16. pkg: grunt.file.readJSON('package.json')
  17. };
  18.  
  19. var configs = require('load-grunt-configs')(grunt, options);
  20.  
  21. // Project configuration.
  22. grunt.initConfig(configs);
  23.  
  24. // load jshint
  25. grunt.registerTask('lint', [
  26. 'jshint'
  27. ]);
  28.  
  29. // default option to connect server
  30. grunt.registerTask('serve', [
  31. 'jshint',
  32. 'concurrent:dev'
  33. ]);
  34.  
  35. grunt.registerTask('prod', [
  36. 'sass:dist',
  37. 'sass:postcss',
  38. 'concat:js',
  39. 'uglify:dist'
  40. ]);
  41.  
  42. grunt.registerTask('server', function () {
  43. grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.');
  44. grunt.task.run(['serve:' + target]);
  45. });
  46.  
  47. grunt.loadNpmTasks('grunt-contrib-compass');
  48. grunt.loadNpmTasks('grunt-contrib-uglify');
  49. grunt.loadNpmTasks('grunt-sass');
  50. grunt.loadNpmTasks('grunt-contrib-concat');
  51. grunt.loadNpmTasks('grunt-contrib-jshint');
  52. grunt.loadNpmTasks('grunt-postcss');
  53. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement