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.

54 lines
1.6 KiB

  1. 'use strict';
  2. var concatDist, concatDistMapped = null;
  3. concatDist = {
  4. options: {
  5. banner: require('./utils/banner') + "(function(angular){\n" + "'use strict';\n",
  6. footer: '\n}(angular));'
  7. },
  8. src: [
  9. 'dist/src/directives/leaflet.js',
  10. 'dist/src/services/*.js',
  11. 'dist/src/**/*.js'
  12. ],
  13. dest: 'dist/<%= pkg.name %>.pre.js'
  14. };
  15. concatDistMapped = _.clone(concatDist, true);
  16. concatDistMapped.options.sourceMap = true;
  17. concatDistMapped.options.sourceMapName = "dist/<%= pkg.name %>_dev_mapped.js.map";
  18. concatDistMapped.dest = "dist/<%= pkg.name %>_dev_mapped.js";
  19. module.exports = function (grunt, options) {
  20. return {
  21. dist: concatDist,
  22. distMapped: concatDistMapped,
  23. license: {
  24. src: [
  25. 'src/header-MIT-license.txt',
  26. 'dist/<%= pkg.name %>.min.no-header.js'
  27. ],
  28. dest: 'dist/<%= pkg.name %>.min.js'
  29. },
  30. examples: {
  31. options: {
  32. banner: '(function(angular){ \nvar app = angular.module(\'webapp\');\n',
  33. footer: '}(angular));'
  34. },
  35. src: ['examples/js/controllers/*.js'],
  36. dest: 'examples/js/controllers.js'
  37. },
  38. website: {
  39. options: {
  40. //separator: ';',
  41. banner: '(function (angular) {\n',
  42. footer: '})(window.angular);'
  43. },
  44. src: ['website/src/js/app.js', 'website/src/js/**/*.js'],
  45. dest: 'website/dist/js/<%= pkg.name %>-webpage.js',
  46. }
  47. };
  48. };