Managed dependencies
-
Include Bootstrap's source Sass and JavaScript files via Bower, Composer, Meteor, or npm. Package managed installs don't include documentation, but do include our Gruntfile and readme.
+
Include Bootstrap's source Sass and JavaScript files via Bower, Composer, Meteor, or npm. Package managed installs don't include documentation, but do include our build system and readme.
View install methods
diff --git a/js/.eslintrc.json b/js/.eslintrc.json
index 07a307a741..69b361045b 100644
--- a/js/.eslintrc.json
+++ b/js/.eslintrc.json
@@ -18,7 +18,6 @@
"no-extra-parens": "error",
"no-prototype-builtins": "off",
"no-template-curly-in-string": "error",
- "no-unsafe-negation": "error",
"valid-jsdoc": "error",
// Best Practices
@@ -45,7 +44,6 @@
"no-extra-bind": "error",
"no-extra-label": "error",
"no-floating-decimal": "error",
- "no-global-assign": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
@@ -70,9 +68,8 @@
],
"no-multi-str": "error",
"no-new": "error",
- "no-new-func": "off",
+ "no-new-func": "error",
"no-new-wrappers": "error",
- "no-new": "error",
"no-octal-escape": "error",
"no-param-reassign": "off",
"no-proto": "error",
@@ -94,6 +91,7 @@
"no-with": "error",
"prefer-promise-reject-errors": "error",
"radix": "error",
+ "require-await": "error",
"vars-on-top": "error",
"wrap-iife": "error",
"yoda": "error",
@@ -128,8 +126,8 @@
"array-bracket-spacing": "error",
"block-spacing": "error",
"brace-style": "error",
- "capitalized-comments": "off",
"camelcase": "error",
+ "capitalized-comments": "off",
"comma-dangle": "error",
"comma-spacing": "error",
"comma-style": "error",
@@ -227,6 +225,7 @@
"object-shorthand": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
+ "prefer-destructuring": "off",
"prefer-numeric-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
diff --git a/js/tests/.eslintrc.json b/js/tests/.eslintrc.json
index 889ea203d9..a05a3a3900 100644
--- a/js/tests/.eslintrc.json
+++ b/js/tests/.eslintrc.json
@@ -1,7 +1,7 @@
{
"env": {
- "qunit": true,
- "es6": false
+ "es6": false,
+ "qunit": true
},
"globals": {
"Util": false
diff --git a/js/tests/README.md b/js/tests/README.md
index b2d505723b..72ece2d36f 100644
--- a/js/tests/README.md
+++ b/js/tests/README.md
@@ -6,7 +6,7 @@ Bootstrap uses [QUnit](https://qunitjs.com/), a powerful, easy-to-use JavaScript
* `vendor/` contains third-party testing-related code (QUnit and jQuery).
* `visual/` contains "visual" tests which are run interactively in real browsers and require manual verification by humans.
-To run the unit test suite via [PhantomJS](http://phantomjs.org/), run `grunt test-js`.
+To run the unit test suite via [PhantomJS](http://phantomjs.org/), run `npm run js-test`.
To run the unit test suite via a real web browser, open `index.html` in the browser.
@@ -16,7 +16,7 @@ To run the unit test suite via a real web browser, open `index.html` in the brow
1. Locate and open the file dedicated to the plugin which you need to add tests to (`unit/
.js`).
2. Review the [QUnit API Documentation](https://api.qunitjs.com/) and use the existing tests as references for how to structure your new tests.
3. Write the necessary unit test(s) for the new or revised functionality.
-4. Run `grunt test-js` to see the results of your newly-added test(s).
+4. Run `npm run js-test` to see the results of your newly-added test(s).
**Note:** Your new unit tests should fail before your changes are applied to the plugin, and should pass after your changes are applied to the plugin.
diff --git a/package.json b/package.json
index e7ec5afe0e..ab1185bd77 100644
--- a/package.json
+++ b/package.json
@@ -30,15 +30,15 @@
"css-minify-docs": "cleancss --level 1 --source-map --output docs/assets/css/docs.min.css docs/assets/css/docs.min.css",
"js": "npm-run-all js-compile js-minify",
"js-docs": "npm-run-all js-lint-docs js-minify-docs",
- "js-lint": "eslint js/ && eslint --config js/tests/.eslintrc.json --env node build/",
+ "js-lint": "eslint js/ && eslint --config js/tests/.eslintrc.json --env node build/ Gruntfile.js",
"js-lint-docs": "eslint --config js/tests/.eslintrc.json docs/assets/js/",
"js-compile": "npm-run-all --parallel js-compile-*",
- "js-compile-bundle": "shx cat js/src/util.js js/src/alert.js js/src/button.js js/src/carousel.js js/src/collapse.js js/src/dropdown.js js/src/modal.js js/src/scrollspy.js js/src/tab.js js/src/tooltip.js js/src/popover.js | shx sed 's/^(import|export).*//' | babel --filename js/src/bootstrap.js | node build/stamp.js > dist/js/bootstrap.js",
+ "js-compile-bundle": "shx cat js/src/util.js js/src/alert.js js/src/button.js js/src/carousel.js js/src/collapse.js js/src/dropdown.js js/src/modal.js js/src/scrollspy.js js/src/tab.js js/src/tooltip.js js/src/popover.js | shx sed \"s/^(import|export).*//\" | babel --filename js/src/bootstrap.js | node build/stamp.js > dist/js/bootstrap.js",
"js-compile-plugins": "babel js/src/ --out-dir js/dist/ --source-maps",
"js-minify": "uglifyjs --compress warnings=false --mangle --comments '/^!/' --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
"js-minify-docs": "uglifyjs --compress warnings=false --mangle --comments '/^!/' --output docs/assets/js/docs.min.js docs/assets/js/vendor/anchor.min.js docs/assets/js/vendor/clipboard.min.js docs/assets/js/vendor/holder.min.js docs/assets/js/src/application.js",
"js-test": "phantomjs ./node_modules/qunit-phantomjs-runner/runner.js js/tests/index.html 60",
- "js-test-cloud": "ruby -run -ehttpd . -p3000 & grunt saucelabs-qunit",
+ "js-test-cloud": "ruby -run -ehttpd . -p3000 > /dev/null & grunt saucelabs-qunit",
"docs": "npm-run-all docs-compile docs-lint",
"docs-lint": "htmlhint --config docs/.htmlhintrc _gh_pages/ js/tests/visual/ && htmllint --rc docs/.htmllintrc _gh_pages/*.html _gh_pages/**/*.html js/tests/visual/*.html",
"docs-clean": "shx rm -r docs/dist/* && shx cp -r dist/* docs/dist/",
@@ -50,7 +50,8 @@
"maintenance-shrinkwrap": "npm shrinkwrap --dev && shx mv npm-shrinkwrap.json build/npm-shrinkwrap.json",
"release-version": "node build/change-version.js",
"release-zip": "cd dist/ && zip -r9 bootstrap-$npm_package_version-dist.zip * && shx mv bootstrap-$npm_package_version-dist.zip ..",
- "test": "npm-run-all --parallel css js && npm-run-all docs"
+ "dist": "npm-run-all --parallel css js",
+ "test": "npm-run-all dist docs"
},
"style": "dist/css/bootstrap.css",
"sass": "scss/bootstrap.scss",