Unify build target behavior with prior behavior

This commit is contained in:
kpdecker
2013-10-01 21:53:56 -05:00
parent a3b22ac6bf
commit 386c20cc63
2 changed files with 25 additions and 29 deletions
+9 -12
View File
@@ -32,12 +32,12 @@ module.exports = function(grunt) {
preserveComments: 'some'
},
dist: {
src: 'dist/<%= pkg.name %>.js',
dest: 'dist/<%= pkg.name %>.min.js'
src: 'dist/handlebars.js',
dest: 'dist/handlebars.min.js'
},
runtime: {
src: 'dist/<%= pkg.name %>.runtime.js',
dest: 'dist/<%= pkg.name %>.runtime.min.js'
src: 'dist/handlebars.runtime.js',
dest: 'dist/handlebars.runtime.min.js'
}
}
});
@@ -46,13 +46,11 @@ module.exports = function(grunt) {
this.registerTask('build', "Builds a distributable version of the current project", [
'jshint',
'clean',
'parser',
'transpile:amd',
'concat:library']);
this.registerTask('tests', "Builds the test package", [
'build',
'concat:deps',
'transpile:tests']);
'transpile:cjs',
'concat',
'uglify']);
// Run a server. This is ideal for running the QUnit tests in the browser.
this.registerTask('server', [
@@ -85,6 +83,5 @@ module.exports = function(grunt) {
});
grunt.registerTask('bench', ['metrics']);
grunt.registerTask('build', ['jshint', 'parser', 'clean', 'concat', 'uglify', 'test']);
grunt.registerTask('default', 'build');
grunt.registerTask('default', ['build', 'test']);
};
+16 -17
View File
@@ -4,31 +4,30 @@ module.exports = {
process: function(src, name) {
var match = /\/\/ BEGIN\(BROWSER\)\n((?:.|\n)*)\n\/\/ END\(BROWSER\)/.exec(src);
return '\n// ' + name + '\n' + (match ? match[1] : src);
},
separator: ';'
}
},
dist: {
src: [
'lib/handlebars/browser-prefix.js',
'lib/handlebars/base.js',
'lib/handlebars/compiler/parser.js',
'lib/handlebars/compiler/base.js',
'lib/handlebars/compiler/ast.js',
'lib/handlebars/utils.js',
'lib/handlebars/compiler/compiler.js',
'lib/handlebars/compiler/javascript-compiler.js',
'lib/handlebars/runtime.js',
'lib/handlebars/browser-suffix.js'
'dist/amd/handlebars/browser-prefix.js',
'dist/amd/handlebars/base.js',
'dist/amd/handlebars/compiler/parser.js',
'dist/amd/handlebars/compiler/base.js',
'dist/amd/handlebars/compiler/ast.js',
'dist/amd/handlebars/utils.js',
'dist/amd/handlebars/compiler/compiler.js',
'dist/amd/handlebars/compiler/javascript-compiler.js',
'dist/amd/handlebars/runtime.js',
'dist/amd/handlebars/browser-suffix.js'
],
dest: 'dist/handlebars.js'
},
runtime: {
src: [
'lib/handlebars/browser-prefix.js',
'lib/handlebars/base.js',
'lib/handlebars/utils.js',
'lib/handlebars/runtime.js',
'lib/handlebars/browser-suffix.js'
'dist/amd/handlebars/browser-prefix.js',
'dist/amd/handlebars/base.js',
'dist/amd/handlebars/utils.js',
'dist/amd/handlebars/runtime.js',
'dist/amd/handlebars/browser-suffix.js'
],
dest: 'dist/handlebars.runtime.js'
}