Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 3 additions & 26 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -321,7 +300,7 @@ module.exports = function (grunt) {

watch: {
src: {
files: '<%= jscs.core.src %>',
files: '<%= concat.bootstrap.src %>',
tasks: ['babel:dev']
},
sass: {
Expand Down Expand Up @@ -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') &&
Expand All @@ -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']);
Expand Down Expand Up @@ -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']);
Expand Down
18 changes: 3 additions & 15 deletions grunt/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down