James Peret's personal portfolio website version 2. Built with Famous.js and AngularJS.

Gruntfile.js 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. module.exports = function(grunt) {
  2. grunt.initConfig({
  3. pkg: grunt.file.readJSON('package.json'),
  4. jshint: {
  5. files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
  6. options: {
  7. globals: {
  8. jQuery: true
  9. }
  10. }
  11. },
  12. watch: {
  13. files: ['<%= jshint.files %>'],
  14. tasks: ['jshint']
  15. },
  16. concat: {
  17. options: {
  18. // define a string to put between each file in the concatenated output
  19. separator: ';'
  20. },
  21. dist: {
  22. // the files to concatenate
  23. src: ['src/**/*.js'],
  24. // the location of the resulting JS file
  25. dest: 'dist/<%= pkg.name %>.js'
  26. }
  27. },
  28. uglify: {
  29. options: {
  30. // the banner is inserted at the top of the output
  31. banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
  32. },
  33. dist: {
  34. files: {
  35. 'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
  36. }
  37. }
  38. },
  39. qunit: {
  40. files: ['test/**/*.html']
  41. },
  42. wiredep: {
  43. task: {
  44. // Point to the files that should be updated when
  45. // you run `grunt wiredep`
  46. src: [
  47. 'app/*.html',
  48. 'app/views/**/*.html', // .html support...
  49. 'app/views/**/*.jade', // .jade support...
  50. 'app/styles/main.scss', // .scss & .sass support...
  51. 'app/config.yml' // and .yml & .yaml support out of the box!
  52. ],
  53. options: {
  54. // See wiredep's configuration documentation for the options
  55. // you may pass:
  56. // https://github.com/taptapship/wiredep#configuration
  57. }
  58. }
  59. },
  60. serve: {
  61. options: {
  62. port: 8000,
  63. }
  64. }
  65. });
  66. grunt.loadNpmTasks('grunt-contrib-uglify');
  67. grunt.loadNpmTasks('grunt-contrib-jshint');
  68. grunt.loadNpmTasks('grunt-contrib-qunit');
  69. grunt.loadNpmTasks('grunt-contrib-watch');
  70. grunt.loadNpmTasks('grunt-contrib-concat');
  71. grunt.loadNpmTasks('grunt-wiredep');
  72. grunt.loadNpmTasks('grunt-serve');
  73. // this would be run by typing "grunt test" on the command line
  74. grunt.registerTask('test', ['jshint', 'qunit']);
  75. // the default task can be run just by typing "grunt" on the command line
  76. grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'wiredep']);
  77. };