Skip to content

Commit 5d75667

Browse files
committed
changes in Gruntfile of moment handlebars and json
1 parent f685fab commit 5d75667

File tree

4 files changed

+34
-5
lines changed

4 files changed

+34
-5
lines changed

_tasks/download/tasks/download.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,6 @@ module.exports = function(grunt) {
6464
done();
6565
});
6666
});
67+
68+
grunt.registerTask('spm-build', ['clean:build', 'transport:src', 'concat:js', 'copy:build', 'uglify:js', 'clean:dist', 'copy:dist', 'clean:build', 'spm-newline']);
6769
};

handlebars/Gruntfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ module.exports = function(grunt) {
2222
});
2323

2424

25-
require('grunt-spm-build').initConfig(grunt, {pkg: pkg});
25+
grunt.loadGlobalTasks('spm-build');
2626
grunt.loadTasks('../_tasks/download/tasks');
27-
grunt.loadGlobalTasks('grunt-spm-build');
28-
grunt.registerTask('build', ['spm-build']);
27+
grunt.util._.merge(grunt.config.data, require('spm-build').config);
28+
grunt.registerTask('build', ['download', 'spm-build']);
2929
};

json/Gruntfile.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module.exports = function(grunt) {
2+
var pkg = grunt.file.readJSON('package.json');
3+
4+
grunt.initConfig({
5+
pkg: pkg,
6+
7+
download: {
8+
options: {
9+
dest: 'src',
10+
},
11+
src: {
12+
options: {
13+
header: 'define(function() {',
14+
footer: 'return this.JSON = this.JSON || JSON; });'
15+
},
16+
url: 'https://raw.github.com/douglascrockford/JSON-js/master/json2.js',
17+
name: 'json.js'
18+
}
19+
}
20+
});
21+
22+
grunt.loadGlobalTasks('spm-build');
23+
grunt.util._.merge(grunt.config.data, require('spm-build').config);
24+
25+
grunt.loadTasks('../_tasks/download/tasks');
26+
grunt.registerTask('build', ['download', 'spm-build']);
27+
};

moment/Gruntfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ module.exports = function(grunt) {
2626
}
2727
});
2828

29-
require('grunt-spm-build').initConfig(grunt, {pkg: pkg});
30-
grunt.loadGlobalTasks('grunt-spm-build');
29+
grunt.loadGlobalTasks('spm-build');
30+
grunt.util._.merge(grunt.config.data, require('spm-build').config);
3131

3232
grunt.loadTasks('../_tasks/download/tasks');
3333
grunt.registerTask('build', ['download', 'spm-build']);

0 commit comments

Comments
 (0)