summaryrefslogtreecommitdiffstats
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-10-14 11:42:45 -0500
committerkpdecker <kpdecker@gmail.com>2013-10-14 11:42:45 -0500
commit3f52109c1c751bc11d7b69569a462169bb9c4762 (patch)
treecf313a622d74e3881ffac30baa79ed0914316f8e /Gruntfile.js
parent84c837869ef3b4067acc0ac638099de6833e6ba5 (diff)
downloadhandlebars.js-3f52109c1c751bc11d7b69569a462169bb9c4762.zip
handlebars.js-3f52109c1c751bc11d7b69569a462169bb9c4762.tar.gz
handlebars.js-3f52109c1c751bc11d7b69569a462169bb9c4762.tar.bz2
Cleanup currently unused grunt configs
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js63
1 files changed, 33 insertions, 30 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index c1fb65c..8687bba 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,9 +1,5 @@
var childProcess = require('child_process');
-function config(name) {
- return require('./configurations/' + name);
-}
-
module.exports = function(grunt) {
grunt.initConfig({
@@ -20,10 +16,28 @@ module.exports = function(grunt) {
},
clean: ["dist"],
- watch: config('watch') ,
- concat: config('concat'),
- connect: config('connect'),
- transpile: config('transpile'),
+ transpile: {
+ amd: {
+ type: "amd",
+ anonymous: true,
+ files: [{
+ expand: true,
+ cwd: 'lib/',
+ src: '**/!(index).js',
+ dest: 'dist/amd/'
+ }]
+ },
+
+ cjs: {
+ type: 'cjs',
+ files: [{
+ expand: true,
+ cwd: 'lib/',
+ src: '**/!(index).js',
+ dest: 'dist/cjs/'
+ }]
+ }
+ },
packager: {
options: {
@@ -83,40 +97,29 @@ module.exports = function(grunt) {
'jshint',
'clean',
'parser',
- 'transpile:amd',
- 'transpile:cjs',
- 'packager-fork']);
-
- this.registerTask('release', 'Build final packages', [
- 'requirejs',
- 'uglify'
- ]);
+ 'node',
+ 'globals']);
- 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: ['packager']}, this.async());
- });
+ this.registerTask('amd', ['transpile:amd', 'requirejs']);
+ this.registerTask('node', ['transpile:cjs']);
+ this.registerTask('globals', ['packager-fork']);
- // Run a server. This is ideal for running the QUnit tests in the browser.
- this.registerTask('server', [
- 'build',
- 'tests',
- 'connect',
- 'watch']);
+ this.registerTask('release', 'Build final packages', ['amd', 'uglify']);
// Load tasks from npm
grunt.loadNpmTasks('grunt-contrib-clean');
- grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-requirejs');
- grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-es6-module-transpiler');
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: ['packager']}, this.async());
+ });
grunt.registerTask('test', function() {
var done = this.async();