0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Kill the grunt-jscs middleman; use JSCS directly instead (#20069)

Refs #19990

[skip sauce]
[skip validator]
This commit is contained in:
Chris Rebert 2016-06-04 17:46:36 -07:00
parent 04165ba6e3
commit 0c4abb69e3
3 changed files with 9 additions and 43 deletions

View File

@ -107,27 +107,6 @@ module.exports = function (grunt) {
}
},
jscs: {
options: {
config: 'js/.jscsrc'
},
grunt: {
src: ['Gruntfile.js', 'grunt/*.js']
},
core: {
src: 'js/src/*.js'
},
test: {
src: 'js/tests/unit/*.js'
},
assets: {
options: {
requireCamelCaseOrUpperCaseIdentifiers: null
},
src: ['docs/assets/js/src/*.js', 'docs/assets/js/*.js', '!docs/assets/js/*.min.js']
}
},
stamp: {
options: {
banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>\n+function ($) {\n',
@ -321,7 +300,7 @@ module.exports = function (grunt) {
watch: {
src: {
files: '<%= jscs.core.src %>',
files: '<%= concat.bootstrap.src %>',
tasks: ['babel:dev']
},
sass: {
@ -412,7 +391,7 @@ module.exports = function (grunt) {
if (runSubset('core') &&
// Skip core tests if this is a Savage build
process.env.TRAVIS_REPO_SLUG !== 'twbs-savage/bootstrap') {
testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'test-scss', 'test-js', 'docs']);
testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'test-scss', 'qunit', 'docs']);
}
// Skip HTML validation if running a different subset of the test suite
if (runSubset('validate-html') &&
@ -432,7 +411,6 @@ module.exports = function (grunt) {
testSubtasks.push('saucelabs-qunit');
}
grunt.registerTask('test', testSubtasks);
grunt.registerTask('test-js', ['jscs:core', 'jscs:test', 'jscs:grunt', 'qunit']);
// JS distribution task.
grunt.registerTask('dist-js', ['babel:dev', 'concat', 'babel:dist', 'stamp', 'uglify:core', 'commonjs']);
@ -469,8 +447,7 @@ module.exports = function (grunt) {
grunt.registerTask('docs-css', ['postcss:docs', 'postcss:examples', 'cssmin:docs']);
grunt.registerTask('lint-docs-css', ['scsslint:docs']);
grunt.registerTask('docs-js', ['uglify:docsJs']);
grunt.registerTask('lint-docs-js', ['jscs:assets']);
grunt.registerTask('docs', ['lint-docs-css', 'docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs']);
grunt.registerTask('docs', ['lint-docs-css', 'docs-css', 'docs-js', 'clean:docs', 'copy:docs']);
grunt.registerTask('docs-github', ['jekyll:github']);
grunt.registerTask('prep-release', ['dist', 'docs', 'docs-github', 'compress']);

View File

@ -1492,18 +1492,6 @@
"from": "grunt-jekyll@>=0.4.2 <0.5.0",
"resolved": "https://registry.npmjs.org/grunt-jekyll/-/grunt-jekyll-0.4.4.tgz"
},
"grunt-jscs": {
"version": "2.8.0",
"from": "grunt-jscs@>=2.8.0 <3.0.0",
"resolved": "https://registry.npmjs.org/grunt-jscs/-/grunt-jscs-2.8.0.tgz",
"dependencies": {
"lodash": {
"version": "4.6.1",
"from": "lodash@>=4.6.1 <4.7.0",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.6.1.tgz"
}
}
},
"grunt-legacy-log": {
"version": "0.1.3",
"from": "grunt-legacy-log@>=0.1.0 <0.2.0",
@ -1936,7 +1924,7 @@
},
"esprima": {
"version": "2.7.2",
"from": "esprima@~2.7.0",
"from": "esprima@>=2.7.0 <2.8.0",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.2.tgz"
},
"js-yaml": {
@ -3627,7 +3615,7 @@
},
"vow": {
"version": "0.4.12",
"from": "vow@>=0.4.1 <0.5.0",
"from": "vow@>=0.4.8 <0.5.0",
"resolved": "https://registry.npmjs.org/vow/-/vow-0.4.12.tgz"
},
"vow-fs": {
@ -3674,7 +3662,7 @@
"dependencies": {
"async": {
"version": "0.2.10",
"from": "async@>=0.2.0 <0.3.0",
"from": "async@0.2.x",
"resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz"
},
"pkginfo": {

View File

@ -18,7 +18,8 @@
"change-version": "node grunt/change-version.js",
"shrinkwrap": "npm shrinkwrap --dev && mv ./npm-shrinkwrap.json ./grunt/npm-shrinkwrap.json",
"eslint": "eslint --config js/.eslintrc.json js/src",
"test": "npm run eslint && grunt test"
"jscs": "jscs --config=js/.jscsrc js/src js/tests/unit docs/assets/js/src docs/assets/js/ie*.js grunt Gruntfile.js",
"test": "npm run eslint && npm run jscs && grunt test"
},
"style": "dist/css/bootstrap.css",
"sass": "scss/bootstrap.scss",
@ -55,13 +56,13 @@
"grunt-exec": "^0.4.6",
"grunt-html": "^7.0.0",
"grunt-jekyll": "^0.4.2",
"grunt-jscs": "^2.8.0",
"grunt-postcss": "^0.8.0",
"grunt-sass": "^1.0.0",
"grunt-saucelabs": "^8.6.1",
"grunt-scss-lint": "^0.3.8",
"grunt-stamp": "^0.1.0",
"is-travis": "^1.0.0",
"jscs": "^2.11.0",
"load-grunt-tasks": "^3.4.0",
"mq4-hover-shim": "^0.3.0",
"postcss-flexbugs-fixes": "^2.0.0",