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();
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
dist: {
|
||||
src: 'tmp/<%= pkg.barename %>.browser1.js',
|
||||
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
|
||||
}
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
module.exports = {
|
||||
options: {
|
||||
banner: '/*!\n\n <%= pkg.name %> v<%= pkg.version %>\n\n<%= grunt.file.read("LICENSE") %>\n@license\n*/\n',
|
||||
process: function(src, name) {
|
||||
var match = /\/\/ BEGIN\(BROWSER\)\n((?:.|\n)*)\n\/\/ END\(BROWSER\)/.exec(src);
|
||||
return '\n// ' + name + '\n' + (match ? match[1] : src);
|
||||
}
|
||||
},
|
||||
dist: {
|
||||
src: [
|
||||
'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: [
|
||||
'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'
|
||||
}
|
||||
};
|
||||
@@ -1,8 +0,0 @@
|
||||
module.exports = {
|
||||
server: {},
|
||||
options: {
|
||||
hostname: '0.0.0.0',
|
||||
port: 8000,
|
||||
base: '.'
|
||||
}
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
module.exports = {
|
||||
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/'
|
||||
}]
|
||||
},
|
||||
|
||||
globals: {
|
||||
type: 'globals',
|
||||
src: ["lib/<%= pkg.barename %>.js", "lib/*/**/*.js"],
|
||||
dest: "tmp/<%= pkg.barename %>.globals.js"
|
||||
},
|
||||
|
||||
tests: {
|
||||
type: 'amd',
|
||||
src: ['test/test_helpers.js', 'test/tests.js', 'test/tests/**/*_test.js'],
|
||||
dest: 'tmp/tests.amd.js'
|
||||
}
|
||||
};
|
||||
@@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
files: ['lib/**', 'vendor/*', 'test/**/*'],
|
||||
tasks: ['build', 'tests']
|
||||
};
|
||||
@@ -34,15 +34,10 @@
|
||||
"dustjs-linkedin": "~2.0.2",
|
||||
"eco": "~1.1.0-rc-3",
|
||||
"grunt": "~0.4.1",
|
||||
"connect": "~2.7.4",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-contrib-clean": "~0.4.1",
|
||||
"grunt-contrib-connect": "~0.3.0",
|
||||
"grunt-contrib-jshint": "~0.6.3",
|
||||
"grunt-contrib-requirejs": "~0.4.1",
|
||||
"grunt-contrib-uglify": "~0.2.2",
|
||||
"grunt-contrib-watch": "~0.4.4",
|
||||
"grunt-hang": "~0.1.2",
|
||||
"grunt-es6-module-transpiler": "joefiorini/grunt-es6-module-transpiler",
|
||||
"es6-module-packager": "*",
|
||||
"jison": "~0.3.0",
|
||||
|
||||
Reference in New Issue
Block a user