summaryrefslogtreecommitdiffstats
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-12-01 14:59:38 -0600
committerkpdecker <kpdecker@gmail.com>2013-12-01 14:59:38 -0600
commit57b4ef08b67291174a6c2a086306a2c639ee2674 (patch)
treeb83208e66250c5dccd541604bcdb763916213cc2 /Gruntfile.js
parentcc16bc47dd49130dc623ad2f289bc015f64c0692 (diff)
downloadhandlebars.js-57b4ef08b67291174a6c2a086306a2c639ee2674.zip
handlebars.js-57b4ef08b67291174a6c2a086306a2c639ee2674.tar.gz
handlebars.js-57b4ef08b67291174a6c2a086306a2c639ee2674.tar.bz2
Use module packager for all transpile tasks
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js43
1 files changed, 17 insertions, 26 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 3a15813..fae5486 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -42,9 +42,20 @@ module.exports = function(grunt) {
}
},
- transpile: {
+ packager: {
+ global: {
+ type: 'global',
+ export: 'Handlebars',
+ files: [{
+ cwd: 'lib/',
+ expand: true,
+ src: ['handlebars*.js'],
+ dest: 'dist/'
+ }]
+ },
+
amd: {
- type: "amd",
+ type: 'amd',
anonymous: true,
files: [{
expand: true,
@@ -64,21 +75,6 @@ module.exports = function(grunt) {
}]
}
},
-
- packager: {
- options: {
- export: 'Handlebars'
- },
-
- global: {
- files: [{
- cwd: 'lib/',
- expand: true,
- src: ['handlebars*.js'],
- dest: 'dist/'
- }]
- }
- },
requirejs: {
options: {
optimize: "none",
@@ -126,9 +122,9 @@ module.exports = function(grunt) {
'node',
'globals']);
- this.registerTask('amd', ['transpile:amd', 'requirejs']);
- this.registerTask('node', ['transpile:cjs']);
- this.registerTask('globals', ['packager-fork']);
+ this.registerTask('amd', ['packager:amd', 'requirejs']);
+ this.registerTask('node', ['packager:cjs']);
+ this.registerTask('globals', ['packager:global']);
this.registerTask('release', 'Build final packages', ['amd', 'uglify', 'copy:dist', 'copy:components', 'copy:cdnjs']);
@@ -138,15 +134,10 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-es6-module-transpiler');
+ grunt.loadNpmTasks('es6-module-packager');
grunt.task.loadTasks('tasks');
- grunt.registerTask('packager-fork', function() {
- // Allows us to run the packager task out of process to work around the multiple
- // traceur exec issues
- grunt.util.spawn({grunt: true, args: ['--stack', 'packager'], opts: {stdio: 'inherit'}}, this.async());
- });
grunt.registerTask('bench', ['metrics']);
grunt.registerTask('default', ['build', 'test', 'release']);