You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.3 KiB

  1. 'use strict';
  2. var getAvailPort = require('./utils/getAvailPort');
  3. var port = getAvailPort(7777);
  4. var _files = ['src/**/*.js'];
  5. var _testFiles = ['test/unit/**.js', 'test/unit/**.coffee',
  6. 'test/e2e/**.js', 'test/unit/**/**.js', 'test/unit/**/**.coffee', 'test/e2e/**/**.js'];
  7. module.exports = function (grunt, options) {
  8. return {
  9. // NOT WORTH THE PINTA when having multiple watches
  10. // options: {
  11. // livereload: port
  12. // },
  13. fast: {
  14. files: _files,
  15. tasks: [
  16. 'fastbuild',
  17. 'uglify',
  18. 'concat:license'
  19. ]
  20. },
  21. source: {
  22. files: _files,
  23. tasks: [
  24. 'fastbuild',
  25. 'uglify',
  26. 'testunit',
  27. 'concat:license'
  28. ]
  29. },
  30. unit: {
  31. files: _testFiles,
  32. tasks: [
  33. 'fastbuild',
  34. 'karma'
  35. ]
  36. },
  37. examples: {
  38. files: ['examples/*.html'],
  39. tasks: [
  40. 'examples'
  41. ]
  42. },
  43. website: {
  44. files: ['website/src/js/app.js', 'website/src/js/**/*.js'],
  45. tasks: ['jshint', 'concat:website', 'uglify'] //'ngmin'
  46. }
  47. };
  48. };