Gruntfile.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. module.exports = function( grunt ) {
  2. grunt.initConfig({
  3. component_build: {
  4. build: {
  5. output: './dist/',
  6. name: 'seed',
  7. styles: false,
  8. scripts: true,
  9. verbose: true
  10. }
  11. },
  12. jshint: {
  13. build: {
  14. src: ['src/**/*.js'],
  15. options: {
  16. jshintrc: "./.jshintrc"
  17. }
  18. }
  19. },
  20. mocha: {
  21. build: {
  22. src: ['test/test.html'],
  23. options: {
  24. reporter: 'Spec',
  25. run: true
  26. }
  27. }
  28. },
  29. watch: {
  30. options: {
  31. livereload: true
  32. },
  33. component: {
  34. files: ['src/**/*.js', 'component.json'],
  35. tasks: 'component_build'
  36. }
  37. }
  38. })
  39. grunt.loadNpmTasks( 'grunt-contrib-watch' )
  40. grunt.loadNpmTasks( 'grunt-contrib-jshint' )
  41. grunt.loadNpmTasks( 'grunt-component-build' )
  42. grunt.loadNpmTasks( 'grunt-mocha' )
  43. grunt.registerTask( 'test', ['mocha'] )
  44. grunt.registerTask( 'default', ['jshint', 'component_build', 'mocha'] )
  45. }