-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathconcat.js
27 lines (24 loc) · 907 Bytes
/
concat.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
'use strict';
module.exports = function (grunt) {
grunt.config('concat', {
options: {
separator: ''
},
dist: {
options: {
// Replace all 'use strict' statements in the code with a single one at the top
// And wrap everything in a self executing anonymous function which scopes window and angular.
banner: '(function (window, angular) {\n\'use strict\';\n',
footer: '\n})(window, angular);',
process: function (src, filepath) {
return '// Source: ' + filepath + '\n' +
src.replace(/('use strict'|"use strict");/g, '');
}
},
src: ['src/**/*.js'],
dest: 'dist/angular-json-editor.js',
nonull: true
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
};