Cleanup currently unused grunt configs
This commit is contained in:
+38
-35
@@ -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']);
|
||||
'node',
|
||||
'globals']);
|
||||
|
||||
this.registerTask('release', 'Build final packages', [
|
||||
'requirejs',
|
||||
'uglify'
|
||||
]);
|
||||
this.registerTask('amd', ['transpile:amd', 'requirejs']);
|
||||
this.registerTask('node', ['transpile:cjs']);
|
||||
this.registerTask('globals', ['packager-fork']);
|
||||
|
||||
this.registerTask('release', 'Build final packages', ['amd', 'uglify']);
|
||||
|
||||
// Load tasks from npm
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-requirejs');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
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());
|
||||
});
|
||||
|
||||
// Run a server. This is ideal for running the QUnit tests in the browser.
|
||||
this.registerTask('server', [
|
||||
'build',
|
||||
'tests',
|
||||
'connect',
|
||||
'watch']);
|
||||
|
||||
// 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('test', function() {
|
||||
var done = this.async();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user