fix(build): Exclude testing tools from production build

This commit is contained in:
vladikoff 2014-05-23 12:49:20 -04:00
Родитель 5c9895abf6
Коммит 846585508e
5 изменённых файлов: 610 добавлений и 2702 удалений

Просмотреть файл

@ -15,11 +15,14 @@
module.exports = function (grunt) {
'use strict';
// show elapsed time at the end
require('time-grunt')(grunt);
// load all grunt tasks
require('load-grunt-tasks')(grunt, {scope: 'dependencies'});
// load all grunt tasks based on environment
if (process.env.NODE_ENV && process.env.NODE_ENV === 'production') {
require('load-grunt-tasks')(grunt, {scope: 'dependencies'});
} else {
// show elapsed time at the end
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt);
}
grunt.initConfig({
});

Просмотреть файл

@ -6,7 +6,6 @@ module.exports = function (grunt) {
'use strict';
grunt.registerTask('build', [
'lint',
'clean:dist',
'selectconfig:dist',
// l10n-generate-pages needs to be run before useminPrepare to seed

3261
npm-shrinkwrap.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -4,7 +4,7 @@
"description": "Firefox Accounts Content Server",
"scripts": {
"start": "grunt server",
"postinstall": "bower install --config.interactive=false -s; cp node_modules/grunt-blanket-mocha/support/* app/bower_components/blanket/src",
"postinstall": "bower install --config.interactive=false -s; node scripts/post_install.js",
"test": "intern-runner config=tests/intern",
"test-remote": "intern-runner config=tests/intern_sauce",
"test-server": "intern-client config=tests/intern_server",
@ -29,42 +29,30 @@
"express": "3.6.0",
"grunt": "0.4.5",
"grunt-autoprefixer": "0.7.3",
"grunt-blanket-mocha": "0.4.0",
"grunt-bower-requirejs": "0.11.0",
"grunt-bump": "0.0.13",
"grunt-cli": "0.1.13",
"grunt-concurrent": "0.5.0",
"grunt-connect-fonts": "0.0.3",
"grunt-contrib-clean": "0.5.0",
"grunt-contrib-concat": "0.4.0",
"grunt-contrib-copy": "0.5.0",
"grunt-contrib-csslint": "0.2.0",
"grunt-contrib-cssmin": "0.9.0",
"grunt-contrib-htmlmin": "0.3.0",
"grunt-contrib-imagemin": "0.5.0",
"grunt-contrib-jshint": "0.10.0",
"grunt-contrib-uglify": "0.4.0",
"grunt-contrib-watch": "0.6.1",
"grunt-conventional-changelog": "1.1.0",
"grunt-copyright": "0.1.0",
"grunt-jscs-checker": "0.4.3",
"grunt-jsonlint": "1.0.4",
"grunt-marked": "0.1.0",
"grunt-mocha": "0.4.10",
"grunt-nsp-shrinkwrap": "0.0.3",
"grunt-po2json": "git://github.com/shane-tomlinson/grunt-po2json.git#c1a7406",
"grunt-requirejs": "0.4.2",
"grunt-rev": "0.1.0",
"grunt-sass": "0.12.1",
"grunt-text-replace": "0.3.11",
"grunt-todo": "0.2.3",
"grunt-usemin": "2.1.1",
"grunt-z-schema": "0.1.0",
"handlebars": "1.3.0",
"helmet": "0.2.1",
"i18n-abide": "0.0.20",
"intel": "0.5.2",
"jshint": "2.5.0",
"jshint-stylish": "0.2.0",
"jsxgettext-recursive": "0.0.3",
"load-grunt-tasks": "0.4.0",
@ -74,7 +62,18 @@
},
"devDependencies": {
"awsbox": "0.7.0",
"grunt-blanket-mocha": "0.4.0",
"grunt-bump": "0.0.13",
"grunt-contrib-csslint": "0.2.0",
"grunt-contrib-jshint": "0.10.0",
"grunt-contrib-watch": "0.6.1",
"grunt-conventional-changelog": "1.1.0",
"grunt-copyright": "0.1.0",
"grunt-jscs-checker": "0.4.3",
"grunt-jsonlint": "1.0.4",
"grunt-todo": "0.2.3",
"intern-geezer": "1.7.0",
"jshint": "2.5.0",
"xmlhttprequest": "git://github.com/zaach/node-XMLHttpRequest.git#onerror"
},
"engines": {

12
scripts/post_install.js Normal file
Просмотреть файл

@ -0,0 +1,12 @@
var env = process.env.NODE_ENV;
var exec = require('child_process').exec;
if (env === 'production') {
process.exit(0);
}
exec('cp node_modules/grunt-blanket-mocha/support/* app/bower_components/blanket/src',
function (error) {
if (error) throw error;
process.exit(0);
});