diff --git a/js/.eslintrc b/.eslintrc
similarity index 100%
rename from js/.eslintrc
rename to .eslintrc
diff --git a/.travis.yml b/.travis.yml
index 979c77ac..28d7a46d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,9 @@
branches:
except:
- v4-dist
- # remove this later
+ # remove the following later:
- v4-dev
+ - v4-gulp
sudo: false # use the container infrastructure
language: node_js
diff --git a/_config.yml b/_config.yml
index e7b88534..e104024f 100644
--- a/_config.yml
+++ b/_config.yml
@@ -61,6 +61,8 @@ cdn:
bootstrap: https://cdn.rawgit.com/twbs/bootstrap/VERSION/dist/js/bootstrap
tether: https://cdn.rawgit.com/HubSpot/tether/vVERSION/dist/js/tether
+ 'ie10-viewport-bug-workaround': https://maxcdn.bootstrapcdn.com/js/ie10-viewport-bug-workaround.js
+
#twitter:
diff --git a/docs/_includes/footer-example.html b/docs/_includes/footer-example.html
index fc380844..599fbe41 100644
--- a/docs/_includes/footer-example.html
+++ b/docs/_includes/footer-example.html
@@ -12,8 +12,7 @@
{% endif %}
-
-
+
-
{% else %}
-
{% endif %}
-
+
+
+
{% if page.layout == "docs" %}
diff --git a/docs/assets/js/src/index.js b/docs/assets/js/src/index.js
index bb902b73..6d3243f0 100644
--- a/docs/assets/js/src/index.js
+++ b/docs/assets/js/src/index.js
@@ -1,6 +1,6 @@
import Style from './style'
import Clipboard from 'clipboard'
-import anchors from 'anchor'
+import anchors from 'anchor-js'
// import all the mdb code
import '../../../../js/src/index' // eslint-disable-line no-unused-vars
diff --git a/docs/getting-started/introduction.md b/docs/getting-started/introduction.md
index 2270d31b..361c808d 100644
--- a/docs/getting-started/introduction.md
+++ b/docs/getting-started/introduction.md
@@ -37,8 +37,9 @@ Add jQuery, Bootstrap, and our Javascript plugins near the end of your pages, ri
{% highlight html %}
-
+
+
@@ -78,8 +79,9 @@ Put it all together and your pages should look like this:
-
+
+
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index 0e98378e..d63b03ca 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -13,7 +13,7 @@ const node_modules = findup('node_modules')
let preset = Preset.baseline({
javascripts: {
- source: { options: {cwd: 'js/src'}},
+ source: {options: {cwd: 'js/src'}},
watch: {options: {cwd: 'js/src'}},
test: {options: {cwd: 'js/tests'}}
},
@@ -31,24 +31,46 @@ let preset = Preset.baseline({
// When converting non-modular dependencies into usable ones using rollup-plugin-commonjs, if they don't have properly read exports add them here.
let namedExports = {}
//namedExports[`${node_modules}/corejs-typeahead/dist/bloodhound.js`] = ['Bloodhound']
+//namedExports[`${node_modules}/anchor-js/anchor.js`] = ['AnchorJS']
let rollupConfig = {
+ debug: true,
+ options: {
+ external: [
+ 'anchor-js',
+ 'clipboard'
+ ],
+ globals: {
+ 'anchor-js': 'anchors',
+ clipboard: 'Clipboard'
+ }
+ },
commonjs: {
options: {
- namedExports: namedExports
+ namedExports: namedExports,
}
}
}
let rollups = [
new RollupEs(gulp, preset, extend(true, {}, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}})),
- new RollupUmd(gulp, preset, extend(true, {}, rollupConfig, {options: {dest: 'bootstrap-material-design.umd.js', moduleName: 'bootstrapMaterialDesign'}})),
- new RollupIife(gulp, preset, extend(true, {}, rollupConfig, {options: {dest: 'bootstrap-material-design.iife.js', moduleName: 'bootstrapMaterialDesign'}})),
+ new RollupUmd(gulp, preset, extend(true, {}, rollupConfig, {
+ options: {
+ dest: 'bootstrap-material-design.umd.js',
+ moduleName: 'bootstrapMaterialDesign'
+ }
+ })),
+ new RollupIife(gulp, preset, extend(true, {}, rollupConfig, {
+ options: {
+ dest: 'bootstrap-material-design.iife.js',
+ moduleName: 'bootstrapMaterialDesign'
+ }
+ })),
]
let eslint = new EsLint(gulp, preset)
let scsslint = new ScssLint(gulp, preset)
-let sass = new Sass(gulp, preset, {debug: true})
+let sass = new Sass(gulp, preset)
let lint = [scsslint, eslint]
// instantiate ordered array of recipes (for each instantiation the tasks will be created e.g. sass and sass:watch)
@@ -58,7 +80,8 @@ let recipes = [
[
sass,
rollups
- ]
+ ],
+ new MinifyCss(gulp, preset)
]
// Simple helper to create the default and watch tasks as a sequence of the recipes already defined
@@ -66,3 +89,36 @@ new TaskSeries(gulp, 'default', recipes)
new TaskSeries(gulp, 'lint', lint)
new TaskSeries(gulp, 'js', [eslint, rollups])
new TaskSeries(gulp, 'css', [scsslint, sass])
+
+
+let docsPreset = Preset.baseline({
+ javascripts: {
+ source: {options: {cwd: 'docs/assets/js/src'}},
+ watch: {options: {cwd: 'docs/assets/js/src'}},
+ test: {options: {cwd: 'docs/assets/js/tests'}},
+ dest: 'docs/dist'
+ },
+ stylesheets: {
+ source: {options: {cwd: 'docs/assets/scss'}},
+ watch: {options: {cwd: 'docs/assets/scss'}},
+ dest: 'docs/dist'
+ }
+ /*,
+ images: {
+ source: {options: {cwd: 'docs/assets/img'}},
+ watch: {options: {cwd: 'docs/assets/img'}},
+ dest: 'docs/dist'
+ } */
+})
+
+const docsConfig = {task: {prefix: 'docs:'}}
+
+let docs = [
+ new EsLint(gulp, docsPreset, docsConfig),
+ new RollupIife(gulp, docsPreset, extend(true, {}, docsConfig, rollupConfig, {
+ options: {
+ dest: 'docs.iife.js',
+ moduleName: 'docs'
+ }
+ }))
+]
diff --git a/js/src/index.js b/js/src/index.js
index 5ef54bf8..5347d03f 100644
--- a/js/src/index.js
+++ b/js/src/index.js
@@ -9,6 +9,7 @@
/* eslint-disable no-unused-vars */
import 'babel-polyfill/dist/polyfill'
+import 'bootstrap'
// invalidComponentMatches is currently disabled due to https://github.com/rollup/rollup/issues/428#issuecomment-170066452
import Checkbox from './checkbox'
diff --git a/package.json b/package.json
index 6af062b9..061c06a6 100644
--- a/package.json
+++ b/package.json
@@ -38,9 +38,10 @@
"tether": "^1.2.0"
},
"devDependencies": {
- "babel-preset-es2015": "^6.6.0",
"babel-eslint": "^5.0.0",
"babel-polyfill": "^6.6",
+ "babel-preset-es2015": "^6.6.0",
+ "extend": "^3.0.0",
"gulp": "^3.9.1",
"gulp-pipeline": "^0.4"
},