From 546fd9d5b20e4dd9752cf0328ba24bcee13990a6 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Tue, 1 Mar 2016 10:49:36 -0600 Subject: [PATCH 01/39] #901 core rollup and sass is working --- .babelrc | 2 +- scss/.scss-lint.yml => .scss-lint.yml | 0 gulpfile.babel.js | 68 ++++++ js/src/index.js | 2 +- package.json | 7 + scss/.csscomb.json | 304 -------------------------- scss/mixins/_drawer.scss | 6 +- 7 files changed, 80 insertions(+), 309 deletions(-) rename scss/.scss-lint.yml => .scss-lint.yml (100%) create mode 100644 gulpfile.babel.js delete mode 100644 scss/.csscomb.json diff --git a/.babelrc b/.babelrc index 85bf7f17..bea32a4a 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,3 @@ { - presets: [ "es2015-rollup" ] + "presets": [ "es2015" ] } diff --git a/scss/.scss-lint.yml b/.scss-lint.yml similarity index 100% rename from scss/.scss-lint.yml rename to .scss-lint.yml diff --git a/gulpfile.babel.js b/gulpfile.babel.js new file mode 100644 index 00000000..0e98378e --- /dev/null +++ b/gulpfile.babel.js @@ -0,0 +1,68 @@ +import {Preset, Clean, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries} from 'gulp-pipeline/src/index' + +// debug the project source - remove for repo +//import {Clean, CleanDigest, Images, MinifyCss, Sass, RollupIife, ScssLint, EsLint, Rev, TaskSeries} from 'gulp-pipeline' +//import Preset from '../../../gulp-pipeline/src/preset' +import extend from 'extend' + +import stringify from 'stringify-object' +import gulp from 'gulp' +import findup from 'findup-sync' +const node_modules = findup('node_modules') + + +let preset = Preset.baseline({ + javascripts: { + source: { options: {cwd: 'js/src'}}, + watch: {options: {cwd: 'js/src'}}, + test: {options: {cwd: 'js/tests'}} + }, + stylesheets: { + source: {options: {cwd: 'scss'}}, + watch: {options: {cwd: 'scss'}} + }, + images: { + source: {options: {cwd: 'images'}}, + watch: {options: {cwd: 'images'}} + } +}) + + +// 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'] + +let rollupConfig = { + commonjs: { + options: { + 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'}})), +] + +let eslint = new EsLint(gulp, preset) +let scsslint = new ScssLint(gulp, preset) +let sass = new Sass(gulp, preset, {debug: true}) +let lint = [scsslint, eslint] + +// instantiate ordered array of recipes (for each instantiation the tasks will be created e.g. sass and sass:watch) +let recipes = [ + new Clean(gulp, preset), + lint, + [ + sass, + rollups + ] +] + +// Simple helper to create the default and watch tasks as a sequence of the recipes already defined +new TaskSeries(gulp, 'default', recipes) +new TaskSeries(gulp, 'lint', lint) +new TaskSeries(gulp, 'js', [eslint, rollups]) +new TaskSeries(gulp, 'css', [scsslint, sass]) diff --git a/js/src/index.js b/js/src/index.js index b12aa4e7..5ef54bf8 100644 --- a/js/src/index.js +++ b/js/src/index.js @@ -8,7 +8,7 @@ */ /* eslint-disable no-unused-vars */ -import '../../node_modules/babel-polyfill/dist/polyfill' +import 'babel-polyfill/dist/polyfill' // 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 94d27d34..6af062b9 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,13 @@ "tether": "^1.2.0" }, "devDependencies": { + "babel-preset-es2015": "^6.6.0", + "babel-eslint": "^5.0.0", + "babel-polyfill": "^6.6", + "gulp": "^3.9.1", + "gulp-pipeline": "^0.4" + }, + "old-grunt-devDependencies": { "autoprefixer": "^6.3.3", "babel-eslint": "^5.0.0", "babel-polyfill": "^6.6", diff --git a/scss/.csscomb.json b/scss/.csscomb.json deleted file mode 100644 index 40695a47..00000000 --- a/scss/.csscomb.json +++ /dev/null @@ -1,304 +0,0 @@ -{ - "always-semicolon": true, - "block-indent": 2, - "color-case": "lower", - "color-shorthand": true, - "element-case": "lower", - "eof-newline": true, - "leading-zero": false, - "remove-empty-rulesets": true, - "space-after-colon": 1, - "space-after-combinator": 1, - "space-before-selector-delimiter": 0, - "space-between-declarations": "\n", - "space-after-opening-brace": "\n", - "space-before-closing-brace": "\n", - "space-before-colon": 0, - "space-before-combinator": 1, - "space-before-opening-brace": 1, - "strip-spaces": true, - "unitless-zero": true, - "vendor-prefix-align": true, - "sort-order": [ - [ - "position", - "top", - "right", - "bottom", - "left", - "z-index", - "display", - "float", - "width", - "min-width", - "max-width", - "height", - "min-height", - "max-height", - "-webkit-box-sizing", - "-moz-box-sizing", - "box-sizing", - "-webkit-appearance", - "padding", - "padding-top", - "padding-right", - "padding-bottom", - "padding-left", - "margin", - "margin-top", - "margin-right", - "margin-bottom", - "margin-left", - "overflow", - "overflow-x", - "overflow-y", - "-webkit-overflow-scrolling", - "-ms-overflow-x", - "-ms-overflow-y", - "-ms-overflow-style", - "clip", - "clear", - "font", - "font-family", - "font-size", - "font-style", - "font-weight", - "font-variant", - "font-size-adjust", - "font-stretch", - "font-effect", - "font-emphasize", - "font-emphasize-position", - "font-emphasize-style", - "font-smooth", - "-webkit-hyphens", - "-moz-hyphens", - "hyphens", - "line-height", - "color", - "text-align", - "-webkit-text-align-last", - "-moz-text-align-last", - "-ms-text-align-last", - "text-align-last", - "text-emphasis", - "text-emphasis-color", - "text-emphasis-style", - "text-emphasis-position", - "text-decoration", - "text-indent", - "text-justify", - "text-outline", - "-ms-text-overflow", - "text-overflow", - "text-overflow-ellipsis", - "text-overflow-mode", - "text-shadow", - "text-transform", - "text-wrap", - "-webkit-text-size-adjust", - "-ms-text-size-adjust", - "letter-spacing", - "-ms-word-break", - "word-break", - "word-spacing", - "-ms-word-wrap", - "word-wrap", - "-moz-tab-size", - "-o-tab-size", - "tab-size", - "white-space", - "vertical-align", - "list-style", - "list-style-position", - "list-style-type", - "list-style-image", - "pointer-events", - "-ms-touch-action", - "touch-action", - "cursor", - "visibility", - "zoom", - "flex-direction", - "flex-order", - "flex-pack", - "flex-align", - "table-layout", - "empty-cells", - "caption-side", - "border-spacing", - "border-collapse", - "content", - "quotes", - "counter-reset", - "counter-increment", - "resize", - "-webkit-user-select", - "-moz-user-select", - "-ms-user-select", - "-o-user-select", - "user-select", - "nav-index", - "nav-up", - "nav-right", - "nav-down", - "nav-left", - "background", - "background-color", - "background-image", - "-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient", - "filter:progid:DXImageTransform.Microsoft.gradient", - "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader", - "filter", - "background-repeat", - "background-attachment", - "background-position", - "background-position-x", - "background-position-y", - "-webkit-background-clip", - "-moz-background-clip", - "background-clip", - "background-origin", - "-webkit-background-size", - "-moz-background-size", - "-o-background-size", - "background-size", - "border", - "border-color", - "border-style", - "border-width", - "border-top", - "border-top-color", - "border-top-style", - "border-top-width", - "border-right", - "border-right-color", - "border-right-style", - "border-right-width", - "border-bottom", - "border-bottom-color", - "border-bottom-style", - "border-bottom-width", - "border-left", - "border-left-color", - "border-left-style", - "border-left-width", - "border-radius", - "border-top-left-radius", - "border-top-right-radius", - "border-bottom-right-radius", - "border-bottom-left-radius", - "-webkit-border-image", - "-moz-border-image", - "-o-border-image", - "border-image", - "-webkit-border-image-source", - "-moz-border-image-source", - "-o-border-image-source", - "border-image-source", - "-webkit-border-image-slice", - "-moz-border-image-slice", - "-o-border-image-slice", - "border-image-slice", - "-webkit-border-image-width", - "-moz-border-image-width", - "-o-border-image-width", - "border-image-width", - "-webkit-border-image-outset", - "-moz-border-image-outset", - "-o-border-image-outset", - "border-image-outset", - "-webkit-border-image-repeat", - "-moz-border-image-repeat", - "-o-border-image-repeat", - "border-image-repeat", - "outline", - "outline-width", - "outline-style", - "outline-color", - "outline-offset", - "-webkit-box-shadow", - "-moz-box-shadow", - "box-shadow", - "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity", - "-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha", - "opacity", - "-ms-interpolation-mode", - "-webkit-transition", - "-moz-transition", - "-ms-transition", - "-o-transition", - "transition", - "-webkit-transition-delay", - "-moz-transition-delay", - "-ms-transition-delay", - "-o-transition-delay", - "transition-delay", - "-webkit-transition-timing-function", - "-moz-transition-timing-function", - "-ms-transition-timing-function", - "-o-transition-timing-function", - "transition-timing-function", - "-webkit-transition-duration", - "-moz-transition-duration", - "-ms-transition-duration", - "-o-transition-duration", - "transition-duration", - "-webkit-transition-property", - "-moz-transition-property", - "-ms-transition-property", - "-o-transition-property", - "transition-property", - "-webkit-transform", - "-moz-transform", - "-ms-transform", - "-o-transform", - "transform", - "-webkit-transform-origin", - "-moz-transform-origin", - "-ms-transform-origin", - "-o-transform-origin", - "transform-origin", - "-webkit-animation", - "-moz-animation", - "-ms-animation", - "-o-animation", - "animation", - "-webkit-animation-name", - "-moz-animation-name", - "-ms-animation-name", - "-o-animation-name", - "animation-name", - "-webkit-animation-duration", - "-moz-animation-duration", - "-ms-animation-duration", - "-o-animation-duration", - "animation-duration", - "-webkit-animation-play-state", - "-moz-animation-play-state", - "-ms-animation-play-state", - "-o-animation-play-state", - "animation-play-state", - "-webkit-animation-timing-function", - "-moz-animation-timing-function", - "-ms-animation-timing-function", - "-o-animation-timing-function", - "animation-timing-function", - "-webkit-animation-delay", - "-moz-animation-delay", - "-ms-animation-delay", - "-o-animation-delay", - "animation-delay", - "-webkit-animation-iteration-count", - "-moz-animation-iteration-count", - "-ms-animation-iteration-count", - "-o-animation-iteration-count", - "animation-iteration-count", - "-webkit-animation-direction", - "-moz-animation-direction", - "-ms-animation-direction", - "-o-animation-direction", - "animation-direction" - ] - ] -} diff --git a/scss/mixins/_drawer.scss b/scss/mixins/_drawer.scss index a7007a25..41430f7f 100644 --- a/scss/mixins/_drawer.scss +++ b/scss/mixins/_drawer.scss @@ -187,7 +187,7 @@ // Overlay - left/right responsive overlay classes and marker class @mixin mdb-drawer-x-overlay-down($breakpoint) { // e.g. &, &-sm, &-md, &-lg - $name: mdb-drawer-breakpoint-name($breakpoint, '-down'); + $name: mdb-drawer-breakpoint-name($breakpoint, "-down"); &.mdb-drawer-overlay { #{unquote($name)} { // mdb-drawer-overlay, mdb-drawer-overlay-sm, mdb-drawer-overlay-md, mdb-drawer-overlay-lg @@ -199,11 +199,11 @@ // Must double up on the .mdb-drawer-overlay class to increase specificity otherwise the // responsive mdb-drawer-in-* media queries above win (and overlay is ignored) &.mdb-drawer-overlay { - @include mdb-drawer-x-overlay() + @include mdb-drawer-x-overlay(); } } @else { @include media-breakpoint-down($breakpoint) { // overlay responsive class - @include mdb-drawer-x-overlay() + @include mdb-drawer-x-overlay(); } } } From ef01aa07c3aa3081b2203fc9a1ceb0f50cb88134 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Tue, 1 Mar 2016 16:07:46 -0600 Subject: [PATCH 02/39] docs.iife is being generated, albeit without the vendor js - need to combine that separately due to the non-cjs/umd modules --- js/.eslintrc => .eslintrc | 0 .travis.yml | 3 +- _config.yml | 2 + docs/_includes/footer-example.html | 3 +- docs/_includes/footer.html | 6 +-- docs/assets/js/src/index.js | 2 +- docs/getting-started/introduction.md | 6 ++- gulpfile.babel.js | 68 +++++++++++++++++++++++++--- js/src/index.js | 1 + package.json | 3 +- 10 files changed, 78 insertions(+), 16 deletions(-) rename js/.eslintrc => .eslintrc (100%) 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" }, From 35d9270ecb57e8b39952979d57f8a31e0558dd1a Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Tue, 1 Mar 2016 16:43:08 -0600 Subject: [PATCH 03/39] docs scsslint and sass works --- docs/assets/scss/mdb/_clipboard-js.scss | 2 +- docs/assets/scss/mdb/_drawer.scss | 2 +- docs/assets/scss/mdb/_sidebar.scss | 2 +- gulpfile.babel.js | 32 ++++++++++++++++++------- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/docs/assets/scss/mdb/_clipboard-js.scss b/docs/assets/scss/mdb/_clipboard-js.scss index 112fffa9..145cdb60 100644 --- a/docs/assets/scss/mdb/_clipboard-js.scss +++ b/docs/assets/scss/mdb/_clipboard-js.scss @@ -1,7 +1,7 @@ .btn-clipboard { //color: #818a91; - border-radius: $border-radius; text-transform: uppercase; + border-radius: $border-radius; &:hover { color: $gray; // #fff; diff --git a/docs/assets/scss/mdb/_drawer.scss b/docs/assets/scss/mdb/_drawer.scss index c2c621c5..e70bca83 100644 --- a/docs/assets/scss/mdb/_drawer.scss +++ b/docs/assets/scss/mdb/_drawer.scss @@ -1,8 +1,8 @@ .bd-example[data-example-id*="drawer-"] { + min-height: 235px; padding-top: 0; padding-right: 0; padding-left: 0; - min-height: 235px; } .bd-example[data-example-id*="drawer-1"] { diff --git a/docs/assets/scss/mdb/_sidebar.scss b/docs/assets/scss/mdb/_sidebar.scss index 0d5c14c0..28caed9d 100644 --- a/docs/assets/scss/mdb/_sidebar.scss +++ b/docs/assets/scss/mdb/_sidebar.scss @@ -1,8 +1,8 @@ .mdb-toc-item-reference { + padding: .25rem .75rem; margin-top: 1rem; //margin-bottom: 1rem; - padding: .25rem .75rem; } .bd-search { diff --git a/gulpfile.babel.js b/gulpfile.babel.js index d63b03ca..cde628a8 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,4 +1,4 @@ -import {Preset, Clean, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries} from 'gulp-pipeline/src/index' +import {Preset, Clean, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' // debug the project source - remove for repo //import {Clean, CleanDigest, Images, MinifyCss, Sass, RollupIife, ScssLint, EsLint, Rev, TaskSeries} from 'gulp-pipeline' @@ -34,7 +34,7 @@ let namedExports = {} //namedExports[`${node_modules}/anchor-js/anchor.js`] = ['AnchorJS'] let rollupConfig = { - debug: true, + //debug: true, options: { external: [ 'anchor-js', @@ -114,11 +114,25 @@ let docsPreset = Preset.baseline({ 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' - } - })) + [ + new ScssLint(gulp, docsPreset, extend(true, {}, docsConfig, { + source: {glob: ['**/*.scss', '!docs.scss']}, + watch: {glob: ['**/*.scss', '!docs.scss']} + })), + new EsLint(gulp, docsPreset, docsConfig) + ], + [ + new RollupIife(gulp, docsPreset, extend(true, {}, docsConfig, rollupConfig, { + options: { + dest: 'docs.iife.js', + moduleName: 'docs' + } + })), + new Uglify(gulp, docsPreset, extend(true, {}, docsConfig, { + task: {name: 'vendor:uglify'}, + source: {options: {cwd: 'docs/assets/js/vendor'}}, + options: {dest: 'docs-vendor.min.js'} + })), + new Sass(gulp, docsPreset, docsConfig) + ] ] From 10539f84ab69977df51f67f8d6b5fad0bbdac68b Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Tue, 1 Mar 2016 16:57:24 -0600 Subject: [PATCH 04/39] #901 banner is added to rollup --- gulpfile.babel.js | 32 +++++++++++++++++++++++++------- package.json | 3 ++- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index cde628a8..7e77479c 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -9,6 +9,8 @@ import stringify from 'stringify-object' import gulp from 'gulp' import findup from 'findup-sync' const node_modules = findup('node_modules') +import pkg from './package.json' +import moment from 'moment' let preset = Preset.baseline({ @@ -43,7 +45,13 @@ let rollupConfig = { globals: { 'anchor-js': 'anchors', clipboard: 'Clipboard' - } + }, + banner: +`/*! + * Bootstrap Material Design v${pkg.version} (${pkg.homepage}) + * Copyright 2014-${moment().format("YYYY")} ${pkg.author} + * Licensed under MIT (https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE) + */` }, commonjs: { options: { @@ -91,6 +99,22 @@ new TaskSeries(gulp, 'js', [eslint, rollups]) new TaskSeries(gulp, 'css', [scsslint, sass]) +/** + * DOCS + */ + +const referenceDocNotice = +`$1\n +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs\n +{% callout info %}\n**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +See the Material Design section for more elements and customization options. +{% endcallout %} +\n\n$2` + + + let docsPreset = Preset.baseline({ javascripts: { source: {options: {cwd: 'docs/assets/js/src'}}, @@ -103,12 +127,6 @@ let docsPreset = Preset.baseline({ 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:'}} diff --git a/package.json b/package.json index 061c06a6..ae7161bb 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "babel-preset-es2015": "^6.6.0", "extend": "^3.0.0", "gulp": "^3.9.1", - "gulp-pipeline": "^0.4" + "gulp-pipeline": "^0.4", + "moment": "^2.11.2" }, "old-grunt-devDependencies": { "autoprefixer": "^6.3.3", From b85944711810bf92c1af08355c2e5446fb74bb5c Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Wed, 2 Mar 2016 14:35:46 -0600 Subject: [PATCH 05/39] working on gulp copy --- Gruntfile.js | 36 ++++++++++++++++++------------------ gulpfile.babel.js | 37 ++++++++++++++++++++++++++----------- 2 files changed, 44 insertions(+), 29 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index be011d03..6702695b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -335,24 +335,24 @@ module.exports = function (grunt) { ], dest: 'docs/getting-started/' }, - 'bs-docs-content': { - options: { - // https://regex101.com/r/cZ7aO8/2 - process: function (content, srcpath) { - return content - // insert docs reference - .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) - // remove sample text 'display' as this is a particular style and is confusing - .replace(/Fancy display heading/, 'Fancy heading'); - } - }, - expand: true, - cwd: '../bootstrap/docs/content', - src: [ - '**/*' - ], - dest: 'docs/content/' - } + //'bs-docs-content': { + // options: { + // // https://regex101.com/r/cZ7aO8/2 + // process: function (content, srcpath) { + // return content + // // insert docs reference + // .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) + // // remove sample text 'display' as this is a particular style and is confusing + // .replace(/Fancy display heading/, 'Fancy heading'); + // } + // }, + // expand: true, + // cwd: '../bootstrap/docs/content', + // src: [ + // '**/*' + // ], + // dest: 'docs/content/' + //} }, connect: { diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 7e77479c..024632d0 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,4 +1,4 @@ -import {Preset, Clean, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' +import {Preset, Clean, Copy, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' // debug the project source - remove for repo //import {Clean, CleanDigest, Images, MinifyCss, Sass, RollupIife, ScssLint, EsLint, Rev, TaskSeries} from 'gulp-pipeline' @@ -46,8 +46,7 @@ let rollupConfig = { 'anchor-js': 'anchors', clipboard: 'Clipboard' }, - banner: -`/*! + banner: `/*! * Bootstrap Material Design v${pkg.version} (${pkg.homepage}) * Copyright 2014-${moment().format("YYYY")} ${pkg.author} * Licensed under MIT (https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE) @@ -104,7 +103,7 @@ new TaskSeries(gulp, 'css', [scsslint, sass]) */ const referenceDocNotice = -`$1\n + `$1\n [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs\n {% callout info %}\n**Bootstrap Reference Documentation** This is a part of the reference documentation from Bootstrap. @@ -114,7 +113,6 @@ See the Material Design section for more \n\n$2` - let docsPreset = Preset.baseline({ javascripts: { source: {options: {cwd: 'docs/assets/js/src'}}, @@ -133,24 +131,41 @@ const docsConfig = {task: {prefix: 'docs:'}} let docs = [ [ - new ScssLint(gulp, docsPreset, extend(true, {}, docsConfig, { + new ScssLint(gulp, docsPreset, docsConfig, { source: {glob: ['**/*.scss', '!docs.scss']}, watch: {glob: ['**/*.scss', '!docs.scss']} - })), + }), new EsLint(gulp, docsPreset, docsConfig) ], [ - new RollupIife(gulp, docsPreset, extend(true, {}, docsConfig, rollupConfig, { + new RollupIife(gulp, docsPreset, docsConfig, rollupConfig, { options: { dest: 'docs.iife.js', moduleName: 'docs' } - })), - new Uglify(gulp, docsPreset, extend(true, {}, docsConfig, { + }), + new Uglify(gulp, docsPreset, docsConfig, { task: {name: 'vendor:uglify'}, source: {options: {cwd: 'docs/assets/js/vendor'}}, options: {dest: 'docs-vendor.min.js'} - })), + }), new Sass(gulp, docsPreset, docsConfig) ] ] + + +let bsDocs = [ + new Copy(gulp, docsPreset, docsConfig, { + task: {name: 'copy:bs-docs-content'}, + source: { + options: {cwd: '../bootstrap/docs/content'}, + glob: ['**/*'] + }, + dest: 'docs/content/', + process: (content, srcpath) => { // https://regex101.com/r/cZ7aO8/2 + return content + .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) // insert docs reference + .replace(/Fancy display heading/, 'Fancy heading') // remove sample text 'display' as this is a particular MD style and is confusing + } + }) +] From 21f2e4573198e851ef540d043bbf22bc3eafb348 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Wed, 9 Mar 2016 10:10:59 -0600 Subject: [PATCH 06/39] docs copy integrated --- docs/content/code.md | 7 ++++--- docs/content/figures.md | 7 ++++--- docs/content/images.md | 7 ++++--- docs/content/reboot.md | 7 ++++--- docs/content/tables.md | 7 ++++--- docs/content/typography.md | 7 ++++--- 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/docs/content/code.md b/docs/content/code.md index 0abd861b..3ddac168 100644 --- a/docs/content/code.md +++ b/docs/content/code.md @@ -7,14 +7,15 @@ group: content [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Styles for inline code snippets and longer, multiline blocks of code. ## Contents diff --git a/docs/content/figures.md b/docs/content/figures.md index 9611ca8b..0357d38c 100644 --- a/docs/content/figures.md +++ b/docs/content/figures.md @@ -7,14 +7,15 @@ group: content [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Anytime you need to display a piece of content—like an image—with an optional caption, consider using a `
`. Use the included `.figure` , `.figure-img` and `.figure-caption` classes to provide some baseline styles for the HTML5 `
` and `
` elements. Images in figures have no explicit size, so be sure to add the `.img-fluid` class to your `` to make it responsive. diff --git a/docs/content/images.md b/docs/content/images.md index 41d00157..6d481d13 100644 --- a/docs/content/images.md +++ b/docs/content/images.md @@ -7,14 +7,15 @@ group: content [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Opt your images into responsive behavior (so they never become larger than their parent elements) and add lightweight styles to them—all via classes. ## Contents diff --git a/docs/content/reboot.md b/docs/content/reboot.md index ec65590a..81cf2c64 100644 --- a/docs/content/reboot.md +++ b/docs/content/reboot.md @@ -8,14 +8,15 @@ redirect_from: "/content/" [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Part of Bootstrap's job is to provide an elegant, consistent, and simple baseline to build upon. We use Reboot, a collection of element-specific CSS changes in a single file, to kickstart that. Reboot builds upon Normalize, providing many HTML elements with somewhat opinionated styles using only element selectors. Additional styling is done only with classes. For example, we reboot some `` styles for a simpler baseline and later provide `.table`, `.table-bordered`, and more. diff --git a/docs/content/tables.md b/docs/content/tables.md index 6d0db4e7..817de4d5 100644 --- a/docs/content/tables.md +++ b/docs/content/tables.md @@ -7,14 +7,15 @@ group: content [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Due to the widespread use of tables across third-party widgets like calendars and date pickers, we've designed our tables to be **opt-in**. Just add the base class `.table` to any `
`. ## Contents diff --git a/docs/content/typography.md b/docs/content/typography.md index e299b1a3..d2edfdc6 100644 --- a/docs/content/typography.md +++ b/docs/content/typography.md @@ -7,14 +7,15 @@ group: content [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Bootstrap includes simple and easily customized typography for headings, body text, lists, and more. For even more control, check out the [textual utility classes]({{ site.baseurl }}/components/utilities/). ## Contents From 68f61c8eb146c9e3e886bf91e3fd27b5d4b192d4 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Wed, 9 Mar 2016 10:23:01 -0600 Subject: [PATCH 07/39] bsDocs components --- Gruntfile.js | 66 +++++++++++++++--------------- docs/components/alerts.md | 7 ++-- docs/components/breadcrumb.md | 7 ++-- docs/components/button-dropdown.md | 7 ++-- docs/components/button-group.md | 7 ++-- docs/components/buttons.md | 7 ++-- docs/components/card.md | 7 ++-- docs/components/carousel.md | 7 ++-- docs/components/collapse.md | 7 ++-- docs/components/dropdowns.md | 7 ++-- docs/components/forms.md | 7 ++-- docs/components/input-group.md | 7 ++-- docs/components/jumbotron.md | 7 ++-- docs/components/list-group.md | 7 ++-- docs/components/modal.md | 7 ++-- docs/components/navbar.md | 7 ++-- docs/components/navs.md | 7 ++-- docs/components/pagination.md | 7 ++-- docs/components/popovers.md | 7 ++-- docs/components/progress.md | 7 ++-- docs/components/scrollspy.md | 7 ++-- docs/components/tag.md | 7 ++-- docs/components/tooltips.md | 7 ++-- docs/components/utilities.md | 7 ++-- gulpfile.babel.js | 36 +++++++++++++--- 25 files changed, 155 insertions(+), 108 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 6702695b..26dba52a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -303,38 +303,38 @@ module.exports = function (grunt) { ], dest: 'docs/assets/scss/' }, - 'bs-docs-components': { - options: { - // //https://regex101.com/r/cZ7aO8/2 - process: function (content, srcpath) { - return content.replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice); - } - }, - expand: true, - cwd: '../bootstrap/docs/components', - src: [ - '**/*' - ], - dest: 'docs/components/' - }, - 'bs-docs-getting-started': { - options: { - // https://regex101.com/r/cZ7aO8/2 - process: function (content, srcpath) { - return content - // insert docs reference - .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) - // remove sample text 'display' as this is a particular style and is confusing - .replace(/Fancy display heading/, 'Fancy heading'); - } - }, - expand: true, - cwd: '../bootstrap/docs/getting-started', - src: [ - 'browsers-devices.md' // only one file - ], - dest: 'docs/getting-started/' - }, + //'bs-docs-components': { + // options: { + // // //https://regex101.com/r/cZ7aO8/2 + // process: function (content, srcpath) { + // return content.replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice); + // } + // }, + // expand: true, + // cwd: '../bootstrap/docs/components', + // src: [ + // '**/*' + // ], + // dest: 'docs/components/' + //}, + //'bs-docs-getting-started': { + // options: { + // // https://regex101.com/r/cZ7aO8/2 + // process: function (content, srcpath) { + // return content + // // insert docs reference + // .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) + // // remove sample text 'display' as this is a particular style and is confusing + // .replace(/Fancy display heading/, 'Fancy heading'); + // } + // }, + // expand: true, + // cwd: '../bootstrap/docs/getting-started', + // src: [ + // 'browsers-devices.md' // only one file + // ], + // dest: 'docs/getting-started/' + //}, //'bs-docs-content': { // options: { // // https://regex101.com/r/cZ7aO8/2 @@ -592,7 +592,7 @@ module.exports = function (grunt) { grunt.registerTask('docs-copy-bootstrap-docs', [ 'copy:bs-docs-js-vendor', 'copy:bs-docs-scss', - 'copy:bs-docs-getting-started', + //'copy:bs-docs-getting-started', 'copy:bs-docs-components', 'copy:bs-docs-content', 'copy:bs-docs-plugins' diff --git a/docs/components/alerts.md b/docs/components/alerts.md index 559b93ae..723cf9f5 100644 --- a/docs/components/alerts.md +++ b/docs/components/alerts.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. ## Contents diff --git a/docs/components/breadcrumb.md b/docs/components/breadcrumb.md index b3759c0d..b82a571e 100644 --- a/docs/components/breadcrumb.md +++ b/docs/components/breadcrumb.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Indicate the current page's location within a navigational hierarchy. Separators are automatically added in CSS through [`::before`](https://developer.mozilla.org/en-US/docs/Web/CSS/::before) and [`content`](https://developer.mozilla.org/en-US/docs/Web/CSS/content). {% example html %} diff --git a/docs/components/button-dropdown.md b/docs/components/button-dropdown.md index 1139d260..8f96a72d 100644 --- a/docs/components/button-dropdown.md +++ b/docs/components/button-dropdown.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Use any button to trigger a dropdown menu by placing it within a `.btn-group` and providing the proper dropdown menu markup. {% callout danger %} diff --git a/docs/components/button-group.md b/docs/components/button-group.md index 42991787..8955d760 100644 --- a/docs/components/button-group.md +++ b/docs/components/button-group.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with [our buttons plugin]({{ site.baseurl }}/components/buttons/#button-plugin). ## Contents diff --git a/docs/components/buttons.md b/docs/components/buttons.md index 37dfd54a..a728886a 100644 --- a/docs/components/buttons.md +++ b/docs/components/buttons.md @@ -8,14 +8,15 @@ redirect_from: "/components/" [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Use Bootstrap's custom button styles for actions in forms, dialogs, and more. Includes support for a handful of contextual variations, sizes, states, and more. ## Contents diff --git a/docs/components/card.md b/docs/components/card.md index 0a316516..66d19e65 100644 --- a/docs/components/card.md +++ b/docs/components/card.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + A **card** is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background colors, and powerful display options. If you're familiar with Bootstrap 3, cards replace our old panels, wells, and thumbnails. Similar functionality to those components is available as modifier classes for cards. diff --git a/docs/components/carousel.md b/docs/components/carousel.md index ceeb4461..51af0fe5 100644 --- a/docs/components/carousel.md +++ b/docs/components/carousel.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + A slideshow component for cycling through elements—images or slides of text—like a carousel. In browsers where the [Page Visibility API](http://www.w3.org/TR/page-visibility/) is supported, the carousel will avoid sliding when the webpage is not visible to the user (such as when the browser tab is inactive, the browser window is minimized, etc.). **Nested carousels are not supported.** ## Contents diff --git a/docs/components/collapse.md b/docs/components/collapse.md index 72117570..d094cf58 100644 --- a/docs/components/collapse.md +++ b/docs/components/collapse.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + The Bootstrap collapse plugin allows you to toggle content on your pages with a bit of JavaScript and some classes. Flexible plugin that utilizes a handful of classes (from the **required [transitions plugin]({{ site.baseurl }}/components/transitions/)**) for easy toggle behavior. ## Contents diff --git a/docs/components/dropdowns.md b/docs/components/dropdowns.md index 78134dc6..25880afe 100644 --- a/docs/components/dropdowns.md +++ b/docs/components/dropdowns.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown JavaScript plugin. They're toggled by clicking, not by hovering; this is [an intentional design decision.](http://markdotto.com/2012/02/27/bootstrap-explained-dropdowns/) ## Contents diff --git a/docs/components/forms.md b/docs/components/forms.md index ba612461..430c15e9 100644 --- a/docs/components/forms.md +++ b/docs/components/forms.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Bootstrap provides several form control styles, layout options, and custom components for creating a wide variety of forms. ## Contents diff --git a/docs/components/input-group.md b/docs/components/input-group.md index 98764050..58788294 100644 --- a/docs/components/input-group.md +++ b/docs/components/input-group.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Easily extend form controls by adding text, buttons, or button groups on either side of textual ``s. ## Contents diff --git a/docs/components/jumbotron.md b/docs/components/jumbotron.md index f1f1d34a..b6649ad4 100644 --- a/docs/components/jumbotron.md +++ b/docs/components/jumbotron.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + A lightweight, flexible component that can optionally extend the entire viewport to showcase key marketing messages on your site. ## Example diff --git a/docs/components/list-group.md b/docs/components/list-group.md index c627c707..1e74905d 100644 --- a/docs/components/list-group.md +++ b/docs/components/list-group.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + List groups are a flexible and powerful component for displaying not only simple lists of elements, but complex ones with custom content. ## Contents diff --git a/docs/components/modal.md b/docs/components/modal.md index e5bf5c5c..2c43c5b1 100644 --- a/docs/components/modal.md +++ b/docs/components/modal.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults. ## Contents diff --git a/docs/components/navbar.md b/docs/components/navbar.md index 60debe4b..bca78508 100644 --- a/docs/components/navbar.md +++ b/docs/components/navbar.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + The navbar is a simple wrapper for positioning branding, navigation, and other elements into a concise navigation header. It's easily extensible and, with the help of our collapse plugin, it can easily integrate offscreen content. ## Contents diff --git a/docs/components/navs.md b/docs/components/navs.md index 2ffd55af..85730d46 100644 --- a/docs/components/navs.md +++ b/docs/components/navs.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Navigation available in Bootstrap share general markup and styles, from the base `.nav` class to the active and disabled states. Swap modifier classes to switch between each style. ## Contents diff --git a/docs/components/pagination.md b/docs/components/pagination.md index e94751bb..6e9f86b1 100644 --- a/docs/components/pagination.md +++ b/docs/components/pagination.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Provide pagination links for your site or app with the multi-page pagination component. ## Contents diff --git a/docs/components/popovers.md b/docs/components/popovers.md index e0259cbe..c996f97e 100644 --- a/docs/components/popovers.md +++ b/docs/components/popovers.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Add small overlay content, like those found in iOS, to any element for housing secondary information. ## Contents diff --git a/docs/components/progress.md b/docs/components/progress.md index 8056f473..0b7dc1a5 100644 --- a/docs/components/progress.md +++ b/docs/components/progress.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Stylize [the HTML5 `` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress) with a few extra classes and some crafty browser-specific CSS. Be sure to read up on the browser support. ## Contents diff --git a/docs/components/scrollspy.md b/docs/components/scrollspy.md index f1d61adf..4e0b173b 100644 --- a/docs/components/scrollspy.md +++ b/docs/components/scrollspy.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + ## Contents * Will be replaced with the ToC, excluding the "Contents" header diff --git a/docs/components/tag.md b/docs/components/tag.md index f70b3189..1e2c9242 100644 --- a/docs/components/tag.md +++ b/docs/components/tag.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Small and adaptive tag for adding context to just about any content. ## Example diff --git a/docs/components/tooltips.md b/docs/components/tooltips.md index ea3ce0b9..2eb87a30 100644 --- a/docs/components/tooltips.md +++ b/docs/components/tooltips.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Inspired by the excellent Tipsy jQuery plugin written by Jason Frame. Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage. ## Contents diff --git a/docs/components/utilities.md b/docs/components/utilities.md index 81894548..56df3937 100644 --- a/docs/components/utilities.md +++ b/docs/components/utilities.md @@ -7,14 +7,15 @@ group: components [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs {% callout info %} -**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. See the Material Design section for more elements and customization options. {% endcallout %} + Bootstrap includes dozens of utilities—classes with a single purpose. They're designed to reduce the frequency of highly repetitive declarations in your CSS while allowing for quick and easy development. ## Contents diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 024632d0..927ceda4 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -154,6 +154,12 @@ let docs = [ ] +const docsProcess = (content, srcpath) => { // https://regex101.com/r/cZ7aO8/2 + return content + .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) // insert docs reference + .replace(/Fancy display heading/, 'Fancy heading') // remove sample text 'display' as this is a particular MD style and is confusing +} + let bsDocs = [ new Copy(gulp, docsPreset, docsConfig, { task: {name: 'copy:bs-docs-content'}, @@ -162,10 +168,28 @@ let bsDocs = [ glob: ['**/*'] }, dest: 'docs/content/', - process: (content, srcpath) => { // https://regex101.com/r/cZ7aO8/2 - return content - .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) // insert docs reference - .replace(/Fancy display heading/, 'Fancy heading') // remove sample text 'display' as this is a particular MD style and is confusing - } - }) + process: docsProcess + }), + + //new Copy(gulp, docsPreset, docsConfig, { + // task: {name: 'copy:bs-docs-getting-started'}, + // source: { + // options: {cwd: '../bootstrap/docs/getting-started'}, + // glob: ['**/*'] + // }, + // dest: 'docs/getting-started/', + // process: docsProcess + //}), + + new Copy(gulp, docsPreset, docsConfig, { + task: {name: 'copy:bs-docs-components'}, + source: { + options: {cwd: '../bootstrap/docs/components'}, + glob: ['**/*'] + }, + dest: 'docs/components/', + process: docsProcess + }), ] + +new TaskSeries(gulp, 'bsDocs', bsDocs) From 7573811e07ee2c447fbcd6d8556bc4ba35f9a397 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Wed, 9 Mar 2016 10:50:09 -0600 Subject: [PATCH 08/39] docs copy scss --- Gruntfile.js | 30 +++++++++++------------ docs/assets/scss/_ads.scss | 2 +- docs/assets/scss/_anchor.scss | 2 +- docs/assets/scss/_booticon.scss | 2 +- docs/assets/scss/_brand.scss | 2 +- docs/assets/scss/_browser-bugs.scss | 2 +- docs/assets/scss/_buttons.scss | 2 +- docs/assets/scss/_callouts.scss | 2 +- docs/assets/scss/_clipboard-js.scss | 2 +- docs/assets/scss/_component-examples.scss | 2 +- docs/assets/scss/_content.scss | 2 +- docs/assets/scss/_examples.scss | 2 +- docs/assets/scss/_featured-sites.scss | 2 +- docs/assets/scss/_featurettes.scss | 2 +- docs/assets/scss/_footer.scss | 2 +- docs/assets/scss/_masthead.scss | 2 +- docs/assets/scss/_nav.scss | 2 +- docs/assets/scss/_page-header.scss | 2 +- docs/assets/scss/_responsive-tests.scss | 2 +- docs/assets/scss/_sidebar.scss | 2 +- docs/assets/scss/_skiplink.scss | 2 +- docs/assets/scss/_syntax.scss | 2 +- docs/assets/scss/_team.scss | 2 +- gulpfile.babel.js | 28 ++++++++++++--------- 24 files changed, 54 insertions(+), 48 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 26dba52a..f71c101d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -288,21 +288,21 @@ module.exports = function (grunt) { dest: 'docs/_plugins/' }, - 'bs-docs-scss': { - options: { - // https://regex101.com/r/hG8lU4/1 - process: function (content, srcpath) { - return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs\n\n$1'); - } - }, - expand: true, - cwd: '../bootstrap/docs/assets/scss', - src: [ - '**/*', - '!docs.scss' // keep variable customizations - ], - dest: 'docs/assets/scss/' - }, + //'bs-docs-scss': { + // options: { + // // https://regex101.com/r/hG8lU4/1 + // process: function (content, srcpath) { + // return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs\n\n$1'); + // } + // }, + // expand: true, + // cwd: '../bootstrap/docs/assets/scss', + // src: [ + // '**/*', + // '!docs.scss' // keep variable customizations + // ], + // dest: 'docs/assets/scss/' + //}, //'bs-docs-components': { // options: { // // //https://regex101.com/r/cZ7aO8/2 diff --git a/docs/assets/scss/_ads.scss b/docs/assets/scss/_ads.scss index 6c7ca977..e1124f1f 100644 --- a/docs/assets/scss/_ads.scss +++ b/docs/assets/scss/_ads.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // scss-lint:disable ImportantRule diff --git a/docs/assets/scss/_anchor.scss b/docs/assets/scss/_anchor.scss index edb1884a..efaf0e2b 100644 --- a/docs/assets/scss/_anchor.scss +++ b/docs/assets/scss/_anchor.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs .anchorjs-link { color: inherit; diff --git a/docs/assets/scss/_booticon.scss b/docs/assets/scss/_booticon.scss index 48f2b47c..a6bd2bb4 100644 --- a/docs/assets/scss/_booticon.scss +++ b/docs/assets/scss/_booticon.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // // Bootstrap "B" Booticon diff --git a/docs/assets/scss/_brand.scss b/docs/assets/scss/_brand.scss index 9d403a41..4bf97b07 100644 --- a/docs/assets/scss/_brand.scss +++ b/docs/assets/scss/_brand.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // // Brand guidelines diff --git a/docs/assets/scss/_browser-bugs.scss b/docs/assets/scss/_browser-bugs.scss index 72ce6f63..41d65a22 100644 --- a/docs/assets/scss/_browser-bugs.scss +++ b/docs/assets/scss/_browser-bugs.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // Wall of Browser Bugs // diff --git a/docs/assets/scss/_buttons.scss b/docs/assets/scss/_buttons.scss index 4ff0c9db..c2c76d62 100644 --- a/docs/assets/scss/_buttons.scss +++ b/docs/assets/scss/_buttons.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // Buttons // diff --git a/docs/assets/scss/_callouts.scss b/docs/assets/scss/_callouts.scss index 0a3b2900..354b9c03 100644 --- a/docs/assets/scss/_callouts.scss +++ b/docs/assets/scss/_callouts.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // // Callouts diff --git a/docs/assets/scss/_clipboard-js.scss b/docs/assets/scss/_clipboard-js.scss index a5507f4b..5300df6f 100644 --- a/docs/assets/scss/_clipboard-js.scss +++ b/docs/assets/scss/_clipboard-js.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // clipboard.js // diff --git a/docs/assets/scss/_component-examples.scss b/docs/assets/scss/_component-examples.scss index 4981d9df..7001d551 100644 --- a/docs/assets/scss/_component-examples.scss +++ b/docs/assets/scss/_component-examples.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // scss-lint:disable QualifyingElement diff --git a/docs/assets/scss/_content.scss b/docs/assets/scss/_content.scss index 647c2ff9..aa3dbe50 100644 --- a/docs/assets/scss/_content.scss +++ b/docs/assets/scss/_content.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // scss-lint:disable IdSelector, NestingDepth, SelectorDepth diff --git a/docs/assets/scss/_examples.scss b/docs/assets/scss/_examples.scss index 55f5fb1a..ad53e374 100644 --- a/docs/assets/scss/_examples.scss +++ b/docs/assets/scss/_examples.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // // Examples diff --git a/docs/assets/scss/_featured-sites.scss b/docs/assets/scss/_featured-sites.scss index 0985ae67..6c421ced 100644 --- a/docs/assets/scss/_featured-sites.scss +++ b/docs/assets/scss/_featured-sites.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs .bd-featured-sites { margin-right: -1px; diff --git a/docs/assets/scss/_featurettes.scss b/docs/assets/scss/_featurettes.scss index 6e4601f2..5c6e645e 100644 --- a/docs/assets/scss/_featurettes.scss +++ b/docs/assets/scss/_featurettes.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs .bd-featurette { padding-top: 3rem; diff --git a/docs/assets/scss/_footer.scss b/docs/assets/scss/_footer.scss index cbd4e5a3..2b44b06b 100644 --- a/docs/assets/scss/_footer.scss +++ b/docs/assets/scss/_footer.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // // Footer diff --git a/docs/assets/scss/_masthead.scss b/docs/assets/scss/_masthead.scss index 3049e88d..c9805e5c 100644 --- a/docs/assets/scss/_masthead.scss +++ b/docs/assets/scss/_masthead.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // scss-lint:disable ImportantRule diff --git a/docs/assets/scss/_nav.scss b/docs/assets/scss/_nav.scss index c3a1925f..642e9a39 100644 --- a/docs/assets/scss/_nav.scss +++ b/docs/assets/scss/_nav.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // // Main navbar diff --git a/docs/assets/scss/_page-header.scss b/docs/assets/scss/_page-header.scss index c17867b5..be3115ac 100644 --- a/docs/assets/scss/_page-header.scss +++ b/docs/assets/scss/_page-header.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // scss-lint:disable ImportantRule diff --git a/docs/assets/scss/_responsive-tests.scss b/docs/assets/scss/_responsive-tests.scss index 21927ce1..414ecb16 100644 --- a/docs/assets/scss/_responsive-tests.scss +++ b/docs/assets/scss/_responsive-tests.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // scss-lint:disable ImportantRule diff --git a/docs/assets/scss/_sidebar.scss b/docs/assets/scss/_sidebar.scss index 7073a757..29f6e6e9 100644 --- a/docs/assets/scss/_sidebar.scss +++ b/docs/assets/scss/_sidebar.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // // Side navigation diff --git a/docs/assets/scss/_skiplink.scss b/docs/assets/scss/_skiplink.scss index d71aa872..7f4ae3d3 100644 --- a/docs/assets/scss/_skiplink.scss +++ b/docs/assets/scss/_skiplink.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs // scss-lint:disable IdSelector diff --git a/docs/assets/scss/_syntax.scss b/docs/assets/scss/_syntax.scss index 1a5a3836..403a41de 100644 --- a/docs/assets/scss/_syntax.scss +++ b/docs/assets/scss/_syntax.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs .hll { background-color: #ffc; } .c { color: #999; } diff --git a/docs/assets/scss/_team.scss b/docs/assets/scss/_team.scss index 932926ef..22b7f810 100644 --- a/docs/assets/scss/_team.scss +++ b/docs/assets/scss/_team.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs .bd-team { margin-bottom: 1.5rem; diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 927ceda4..5287ba62 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -171,16 +171,6 @@ let bsDocs = [ process: docsProcess }), - //new Copy(gulp, docsPreset, docsConfig, { - // task: {name: 'copy:bs-docs-getting-started'}, - // source: { - // options: {cwd: '../bootstrap/docs/getting-started'}, - // glob: ['**/*'] - // }, - // dest: 'docs/getting-started/', - // process: docsProcess - //}), - new Copy(gulp, docsPreset, docsConfig, { task: {name: 'copy:bs-docs-components'}, source: { @@ -190,6 +180,22 @@ let bsDocs = [ dest: 'docs/components/', process: docsProcess }), + + new Copy(gulp, docsPreset, docsConfig, { + task: {name: 'copy:bs-docs-scss'}, + source: { + options: {cwd: '../bootstrap/docs/assets/scss'}, + glob: [ + '**/*', + '!docs.scss' // keep variable customizations + ] + }, + dest: 'docs/assets/scss/', + process: (content, srcpath) => { + return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs\n\n$1'); + } + }), ] -new TaskSeries(gulp, 'bsDocs', bsDocs) + +new TaskSeries(gulp, 'docs:copy-bs', bsDocs) From 76cc724b563e1d48caa6c13c085ba2ec305b91e1 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Wed, 9 Mar 2016 10:57:13 -0600 Subject: [PATCH 09/39] bsDocs plugin copy --- Gruntfile.js | 13 ++++++------- gulpfile.babel.js | 14 ++++++++++---- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index f71c101d..8a8a2b07 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -281,13 +281,12 @@ module.exports = function (grunt) { ], dest: 'docs/assets/js/vendor/' }, - 'bs-docs-plugins': { - expand: true, - cwd: '../bootstrap/docs/_plugins', - src: ['**/*', '!bridge.rb'], - dest: 'docs/_plugins/' - }, - + //'bs-docs-plugins': { + // expand: true, + // cwd: '../bootstrap/docs/_plugins', + // src: ['**/*', '!bridge.rb'], + // dest: 'docs/_plugins/' + //}, //'bs-docs-scss': { // options: { // // https://regex101.com/r/hG8lU4/1 diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 5287ba62..ab13a25d 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -185,16 +185,22 @@ let bsDocs = [ task: {name: 'copy:bs-docs-scss'}, source: { options: {cwd: '../bootstrap/docs/assets/scss'}, - glob: [ - '**/*', - '!docs.scss' // keep variable customizations - ] + glob: ['**/*', '!docs.scss'] // keep variable customizations }, dest: 'docs/assets/scss/', process: (content, srcpath) => { return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs\n\n$1'); } }), + + new Copy(gulp, docsPreset, docsConfig, { + task: {name: 'copy:bs-docs-plugins'}, + source: { + options: {cwd: '../bootstrap/docs/_plugins'}, + glob: ['**/*', '!bridge.rb'] + }, + dest: 'docs/_plugins/' + }), ] From c7e8aefd94dffd4436678c9fc55fdce8c2b3cb4b Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Wed, 9 Mar 2016 11:01:06 -0600 Subject: [PATCH 10/39] bsDocs js vendor copy --- Gruntfile.js | 20 ++++++++++---------- gulpfile.babel.js | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 8a8a2b07..61527b18 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -271,16 +271,16 @@ module.exports = function (grunt) { ], dest: 'docs/dist/' }, - 'bs-docs-js-vendor': { - expand: true, - cwd: '../bootstrap/docs/assets/js/vendor', - src: [ - '**/*', - '!tether.min.js', - '!jquery.min.js' - ], - dest: 'docs/assets/js/vendor/' - }, + //'bs-docs-js-vendor': { + // expand: true, + // cwd: '../bootstrap/docs/assets/js/vendor', + // src: [ + // '**/*', + // '!tether.min.js', + // '!jquery.min.js' + // ], + // dest: 'docs/assets/js/vendor/' + //}, //'bs-docs-plugins': { // expand: true, // cwd: '../bootstrap/docs/_plugins', diff --git a/gulpfile.babel.js b/gulpfile.babel.js index ab13a25d..7ceadabe 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -201,7 +201,21 @@ let bsDocs = [ }, dest: 'docs/_plugins/' }), + + new Copy(gulp, docsPreset, docsConfig, { + task: {name: 'copy:bs-docs-js-vendor'}, + source: { + options: {cwd: '../bootstrap/docs/assets/js/vendor'}, + glob: [ + '**/*', + '!tether.min.js', + '!jquery.min.js' + ] + }, + dest: 'docs/assets/js/vendor/' + }), ] + new TaskSeries(gulp, 'docs:copy-bs', bsDocs) From 25436dff34cccd81abea81afcc81205c9dcb9351 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Wed, 9 Mar 2016 11:39:56 -0600 Subject: [PATCH 11/39] dist-to-docs copy --- Gruntfile.js | 18 +++++++++--------- gulpfile.babel.js | 41 ++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 61527b18..ea436d19 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -262,15 +262,15 @@ module.exports = function (grunt) { }, copy: { - 'dist-to-docs': { // for example templates - expand: true, - cwd: 'dist', - src: [ - 'js/*.iife*', - 'css/*.*' - ], - dest: 'docs/dist/' - }, + //'dist-to-docs': { // for example templates + // expand: true, + // cwd: 'dist', + // src: [ + // 'js/*.iife*', + // 'css/*.*' + // ], + // dest: 'docs/dist/' + //}, //'bs-docs-js-vendor': { // expand: true, // cwd: '../bootstrap/docs/assets/js/vendor', diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 7ceadabe..5c3eb675 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -101,18 +101,6 @@ new TaskSeries(gulp, 'css', [scsslint, sass]) /** * DOCS */ - -const referenceDocNotice = - `$1\n -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs\n -{% callout info %}\n**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. -See the Material Design section for more elements and customization options. -{% endcallout %} -\n\n$2` - - let docsPreset = Preset.baseline({ javascripts: { source: {options: {cwd: 'docs/assets/js/src'}}, @@ -153,6 +141,15 @@ let docs = [ ] ] +const referenceDocNotice = + `$1\n +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs\n +{% callout info %}\n**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +See the Material Design section for more elements and customization options. +{% endcallout %} +\n\n$2` const docsProcess = (content, srcpath) => { // https://regex101.com/r/cZ7aO8/2 return content @@ -170,7 +167,6 @@ let bsDocs = [ dest: 'docs/content/', process: docsProcess }), - new Copy(gulp, docsPreset, docsConfig, { task: {name: 'copy:bs-docs-components'}, source: { @@ -180,7 +176,6 @@ let bsDocs = [ dest: 'docs/components/', process: docsProcess }), - new Copy(gulp, docsPreset, docsConfig, { task: {name: 'copy:bs-docs-scss'}, source: { @@ -189,10 +184,9 @@ let bsDocs = [ }, dest: 'docs/assets/scss/', process: (content, srcpath) => { - return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs\n\n$1'); + return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs\n\n$1'); } }), - new Copy(gulp, docsPreset, docsConfig, { task: {name: 'copy:bs-docs-plugins'}, source: { @@ -201,7 +195,6 @@ let bsDocs = [ }, dest: 'docs/_plugins/' }), - new Copy(gulp, docsPreset, docsConfig, { task: {name: 'copy:bs-docs-js-vendor'}, source: { @@ -213,9 +206,15 @@ let bsDocs = [ ] }, dest: 'docs/assets/js/vendor/' - }), + }) ] +new TaskSeries(gulp, 'docs:copy:bs', bsDocs) - - -new TaskSeries(gulp, 'docs:copy-bs', bsDocs) +new Copy(gulp, docsPreset, docsConfig, { + task: {name: 'copy:dist'}, + source: { + options: {cwd: 'dist'}, + glob: ['js/*.iife*', 'css/*.*'] + }, + dest: 'docs/dist/' +}) From 0dd35738405c052648cbd286cba44d45db5f4355 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Wed, 9 Mar 2016 13:37:05 -0600 Subject: [PATCH 12/39] jekyll converted to gulp --- Gruntfile.js | 28 ++++++++++++++-------------- gulpfile.babel.js | 4 +++- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index ea436d19..62ef4a8f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -363,20 +363,20 @@ module.exports = function (grunt) { } }, - jekyll: { - options: { - bundleExec: true, - config: '_config.yml', - incremental: false - }, - docs: {}, - github: { - options: { - //raw: 'github: true' - raw: 'baseurl: "/bootstrap-material-design"' - } - } - }, + //jekyll: { + // options: { + // bundleExec: true, + // config: '_config.yml', + // incremental: false + // }, + // docs: {}, + // github: { + // options: { + // //raw: 'github: true' + // raw: 'baseurl: "/bootstrap-material-design"' + // } + // } + //}, htmllint: { options: { diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 5c3eb675..b0d0382e 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,4 +1,4 @@ -import {Preset, Clean, Copy, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' +import {Preset, Clean, Copy, Jekyll, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' // debug the project source - remove for repo //import {Clean, CleanDigest, Images, MinifyCss, Sass, RollupIife, ScssLint, EsLint, Rev, TaskSeries} from 'gulp-pipeline' @@ -218,3 +218,5 @@ new Copy(gulp, docsPreset, docsConfig, { }, dest: 'docs/dist/' }) + +new Jekyll(gulp, docsPreset, docsConfig, {options: {raw: 'baseurl: "/bootstrap-material-design"'}}) From 2dafee14dc751a86d960ccc703b05e2d52ab7ec5 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Wed, 9 Mar 2016 17:08:03 -0600 Subject: [PATCH 13/39] separate main and docs gulp files for easier maintenance --- gulp-docs.js | 129 +++++++++++++++++++++++++++++++++++ gulpfile.babel.js | 166 +++++++--------------------------------------- 2 files changed, 153 insertions(+), 142 deletions(-) create mode 100644 gulp-docs.js diff --git a/gulp-docs.js b/gulp-docs.js new file mode 100644 index 00000000..c3b5c0c5 --- /dev/null +++ b/gulp-docs.js @@ -0,0 +1,129 @@ +import {Preset, Clean, Copy, Jekyll, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' +//import gulp from 'gulp' +//import findup from 'findup-sync' +//import pkg from './package.json' +//import moment from 'moment' + +const referenceDocNotice = + `$1\n +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs\n +{% callout info %}\n**Bootstrap Reference Documentation** +This is a part of the reference documentation from Bootstrap. +It is included here to demonstrate rendering with Material Design for Bootstrap default styling. +See the Material Design section for more elements and customization options. +{% endcallout %} +\n\n$2` + +const copyProcessor = (content, srcpath) => { // https://regex101.com/r/cZ7aO8/2 + return content + .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) // insert docs reference + .replace(/Fancy display heading/, 'Fancy heading') // remove sample text 'display' as this is a particular MD style and is confusing +} + +const preset = 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' + } +}) + +const prefix = {task: {prefix: 'docs:'}} + +export default function (gulp, options) { + + let javascripts = [ + new RollupIife(gulp, preset, prefix, options.rollupConfig, { + options: { + dest: 'docs.iife.js', + moduleName: 'docs' + } + }), + new Uglify(gulp, preset, prefix, { + task: {name: 'vendor:uglify'}, + source: {options: {cwd: 'docs/assets/js/vendor'}}, + options: {dest: 'docs-vendor.min.js'} + }) + ] + + let eslint = new EsLint(gulp, preset, prefix) + let scsslint = new ScssLint(gulp, preset, prefix, { + source: {glob: ['**/*.scss', '!docs.scss']}, + watch: {glob: ['**/*.scss', '!docs.scss']} + }) + let linters = [scsslint, eslint] + let sass = new Sass(gulp, preset, prefix) + let jekyll = new Jekyll(gulp, preset, prefix, {options: {raw: 'baseurl: "/bootstrap-material-design"'}}) + + new TaskSeries(gulp, 'default', [ + new Clean(gulp, preset), + linters, + [ + sass, + javascripts + ], + new MinifyCss(gulp, preset, prefix) + ], prefix) + new TaskSeries(gulp, 'lint', linters, prefix) + new TaskSeries(gulp, 'js', [eslint, javascripts], prefix) + new TaskSeries(gulp, 'css', [scsslint, sass], prefix) + + // docs copy + new TaskSeries(gulp, 'copy:bs-docs', [ + new Copy(gulp, preset, prefix, { + task: {name: 'copy:bs-docs-content'}, + source: { + options: {cwd: '../bootstrap/docs/content'}, + glob: ['**/*'] + }, + dest: 'docs/content/', + process: copyProcessor + }), + new Copy(gulp, preset, prefix, { + task: {name: 'copy:bs-docs-components'}, + source: { + options: {cwd: '../bootstrap/docs/components'}, + glob: ['**/*'] + }, + dest: 'docs/components/', + process: copyProcessor + }), + new Copy(gulp, preset, prefix, { + task: {name: 'copy:bs-docs-scss'}, + source: { + options: {cwd: '../bootstrap/docs/assets/scss'}, + glob: ['**/*', '!docs.scss'] // keep variable customizations + }, + dest: 'docs/assets/scss/', + process: (content, srcpath) => { + return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs\n\n$1'); + } + }), + new Copy(gulp, preset, prefix, { + task: {name: 'copy:bs-docs-plugins'}, + source: { + options: {cwd: '../bootstrap/docs/_plugins'}, + glob: ['**/*', '!bridge.rb'] + }, + dest: 'docs/_plugins/' + }), + new Copy(gulp, preset, prefix, { + task: {name: 'copy:bs-docs-js-vendor'}, + source: { + options: {cwd: '../bootstrap/docs/assets/js/vendor'}, + glob: [ + '**/*', + '!tether.min.js', + '!jquery.min.js' + ] + }, + dest: 'docs/assets/js/vendor/' + }, prefix) + ]) +} diff --git a/gulpfile.babel.js b/gulpfile.babel.js index b0d0382e..ac3c21a1 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,17 +1,11 @@ import {Preset, Clean, Copy, Jekyll, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' - -// debug the project source - remove for repo -//import {Clean, CleanDigest, Images, MinifyCss, Sass, RollupIife, ScssLint, EsLint, Rev, TaskSeries} from 'gulp-pipeline' -//import Preset from '../../../gulp-pipeline/src/preset' -import extend from 'extend' - -import stringify from 'stringify-object' import gulp from 'gulp' import findup from 'findup-sync' -const node_modules = findup('node_modules') import pkg from './package.json' import moment from 'moment' +import gulpDocs from './gulp-docs' +const node_modules = findup('node_modules') let preset = Preset.baseline({ javascripts: { @@ -60,163 +54,51 @@ let rollupConfig = { } let rollups = [ - new RollupEs(gulp, preset, extend(true, {}, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}})), - new RollupUmd(gulp, preset, extend(true, {}, rollupConfig, { + new RollupEs(gulp, preset, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}}), + new RollupUmd(gulp, preset, rollupConfig, { options: { dest: 'bootstrap-material-design.umd.js', moduleName: 'bootstrapMaterialDesign' } - })), - new RollupIife(gulp, preset, extend(true, {}, rollupConfig, { + }), + new RollupIife(gulp, preset, 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) -let lint = [scsslint, eslint] +let linters = [scsslint, eslint] -// instantiate ordered array of recipes (for each instantiation the tasks will be created e.g. sass and sass:watch) -let recipes = [ +new TaskSeries(gulp, 'default', [ new Clean(gulp, preset), - lint, + linters, [ sass, rollups ], new MinifyCss(gulp, preset) -] - -// Simple helper to create the default and watch tasks as a sequence of the recipes already defined -new TaskSeries(gulp, 'default', recipes) -new TaskSeries(gulp, 'lint', lint) +]) +new TaskSeries(gulp, 'lint', linters) new TaskSeries(gulp, 'js', [eslint, rollups]) new TaskSeries(gulp, 'css', [scsslint, sass]) -/** - * DOCS - */ -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' - } -}) +gulpDocs(gulp, {rollupConfig: rollupConfig}) -const docsConfig = {task: {prefix: 'docs:'}} -let docs = [ - [ - new ScssLint(gulp, docsPreset, docsConfig, { - source: {glob: ['**/*.scss', '!docs.scss']}, - watch: {glob: ['**/*.scss', '!docs.scss']} - }), - new EsLint(gulp, docsPreset, docsConfig) - ], - [ - new RollupIife(gulp, docsPreset, docsConfig, rollupConfig, { - options: { - dest: 'docs.iife.js', - moduleName: 'docs' - } - }), - new Uglify(gulp, docsPreset, docsConfig, { - task: {name: 'vendor:uglify'}, - source: {options: {cwd: 'docs/assets/js/vendor'}}, - options: {dest: 'docs-vendor.min.js'} - }), - new Sass(gulp, docsPreset, docsConfig) - ] -] - -const referenceDocNotice = - `$1\n -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs\n -{% callout info %}\n**Bootstrap Reference Documentation** -This is a part of the reference documentation from Bootstrap. -It is included here to demonstrate rendering with Material Design for Bootstrap default styling. -See the Material Design section for more elements and customization options. -{% endcallout %} -\n\n$2` - -const docsProcess = (content, srcpath) => { // https://regex101.com/r/cZ7aO8/2 - return content - .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) // insert docs reference - .replace(/Fancy display heading/, 'Fancy heading') // remove sample text 'display' as this is a particular MD style and is confusing -} - -let bsDocs = [ - new Copy(gulp, docsPreset, docsConfig, { - task: {name: 'copy:bs-docs-content'}, - source: { - options: {cwd: '../bootstrap/docs/content'}, - glob: ['**/*'] - }, - dest: 'docs/content/', - process: docsProcess - }), - new Copy(gulp, docsPreset, docsConfig, { - task: {name: 'copy:bs-docs-components'}, - source: { - options: {cwd: '../bootstrap/docs/components'}, - glob: ['**/*'] - }, - dest: 'docs/components/', - process: docsProcess - }), - new Copy(gulp, docsPreset, docsConfig, { - task: {name: 'copy:bs-docs-scss'}, - source: { - options: {cwd: '../bootstrap/docs/assets/scss'}, - glob: ['**/*', '!docs.scss'] // keep variable customizations - }, - dest: 'docs/assets/scss/', - process: (content, srcpath) => { - return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs\n\n$1'); - } - }), - new Copy(gulp, docsPreset, docsConfig, { - task: {name: 'copy:bs-docs-plugins'}, - source: { - options: {cwd: '../bootstrap/docs/_plugins'}, - glob: ['**/*', '!bridge.rb'] - }, - dest: 'docs/_plugins/' - }), - new Copy(gulp, docsPreset, docsConfig, { - task: {name: 'copy:bs-docs-js-vendor'}, - source: { - options: {cwd: '../bootstrap/docs/assets/js/vendor'}, - glob: [ - '**/*', - '!tether.min.js', - '!jquery.min.js' - ] - }, - dest: 'docs/assets/js/vendor/' - }) -] -new TaskSeries(gulp, 'docs:copy:bs', bsDocs) - -new Copy(gulp, docsPreset, docsConfig, { - task: {name: 'copy:dist'}, - source: { - options: {cwd: 'dist'}, - glob: ['js/*.iife*', 'css/*.*'] - }, - dest: 'docs/dist/' -}) - -new Jekyll(gulp, docsPreset, docsConfig, {options: {raw: 'baseurl: "/bootstrap-material-design"'}}) +// +//new Copy(gulp, preset, { +// task: {name: 'copy:dist-to-docs'}, +// source: { +// options: {cwd: 'dist'}, +// glob: ['js/*.iife*', 'css/*.*'] +// }, +// dest: 'docs/dist/' +//}) +// +//new TaskSeries(gulp, 'prep-release', []) From e3a9605a95460eb2d723ca9ab4dbf0b1ffe67b6f Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Wed, 9 Mar 2016 17:50:43 -0600 Subject: [PATCH 14/39] integrated the publish --- gulp-docs.js | 7 +------ gulpfile.babel.js | 37 ++++++++++++++++++++++++++----------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/gulp-docs.js b/gulp-docs.js index c3b5c0c5..aa007c21 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -1,8 +1,4 @@ import {Preset, Clean, Copy, Jekyll, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' -//import gulp from 'gulp' -//import findup from 'findup-sync' -//import pkg from './package.json' -//import moment from 'moment' const referenceDocNotice = `$1\n @@ -59,10 +55,9 @@ export default function (gulp, options) { }) let linters = [scsslint, eslint] let sass = new Sass(gulp, preset, prefix) - let jekyll = new Jekyll(gulp, preset, prefix, {options: {raw: 'baseurl: "/bootstrap-material-design"'}}) new TaskSeries(gulp, 'default', [ - new Clean(gulp, preset), + new Clean(gulp, preset, prefix), linters, [ sass, diff --git a/gulpfile.babel.js b/gulpfile.babel.js index ac3c21a1..b317de11 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,4 +1,4 @@ -import {Preset, Clean, Copy, Jekyll, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' +import {Preset, Clean, Copy, Jekyll, MinifyCss, Prepublish, PublishBuild, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' import gulp from 'gulp' import findup from 'findup-sync' import pkg from './package.json' @@ -92,13 +92,28 @@ gulpDocs(gulp, {rollupConfig: rollupConfig}) // -//new Copy(gulp, preset, { -// task: {name: 'copy:dist-to-docs'}, -// source: { -// options: {cwd: 'dist'}, -// glob: ['js/*.iife*', 'css/*.*'] -// }, -// dest: 'docs/dist/' -//}) -// -//new TaskSeries(gulp, 'prep-release', []) +let prepRelease = new TaskSeries(gulp, 'prep-release', [ + new Prepublish(gulp, preset), + 'default', + 'docs:default', + new Copy(gulp, preset, { + task: {name: 'copy:dist-to-docs'}, + source: { + options: {cwd: 'dist'}, + glob: ['js/*.iife*', 'css/*.*'] + }, + dest: 'docs/dist/' + }), + new Jekyll(gulp, preset, {options: {raw: 'baseurl: "/bootstrap-material-design"'}}) +]) + + +new TaskSeries(gulp, 'publish', [ + prepRelease, + new PublishBuild(gulp, preset, { + npm: { + bump: false, + publish: false + } + }) +]) From 8f4ec7c96cb0a5e2158f6543f25d4975cd995490 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Thu, 10 Mar 2016 10:12:16 -0600 Subject: [PATCH 15/39] working on prep-release task --- gulp-docs.js | 16 +++++++--------- gulpfile.babel.js | 11 ++++------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/gulp-docs.js b/gulp-docs.js index aa007c21..7294679c 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -36,11 +36,11 @@ export default function (gulp, options) { let javascripts = [ new RollupIife(gulp, preset, prefix, options.rollupConfig, { - options: { - dest: 'docs.iife.js', - moduleName: 'docs' - } - }), + options: { + dest: 'docs.iife.js', + moduleName: 'docs' + } + }), new Uglify(gulp, preset, prefix, { task: {name: 'vendor:uglify'}, source: {options: {cwd: 'docs/assets/js/vendor'}}, @@ -59,10 +59,8 @@ export default function (gulp, options) { new TaskSeries(gulp, 'default', [ new Clean(gulp, preset, prefix), linters, - [ - sass, - javascripts - ], + sass, + javascripts, new MinifyCss(gulp, preset, prefix) ], prefix) new TaskSeries(gulp, 'lint', linters, prefix) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index b317de11..b3d8f0b4 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -30,7 +30,6 @@ let namedExports = {} //namedExports[`${node_modules}/anchor-js/anchor.js`] = ['AnchorJS'] let rollupConfig = { - //debug: true, options: { external: [ 'anchor-js', @@ -53,7 +52,7 @@ let rollupConfig = { } } -let rollups = [ +let javascripts = [ new RollupEs(gulp, preset, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}}), new RollupUmd(gulp, preset, rollupConfig, { options: { @@ -77,14 +76,12 @@ let linters = [scsslint, eslint] new TaskSeries(gulp, 'default', [ new Clean(gulp, preset), linters, - [ - sass, - rollups - ], + sass, + javascripts, new MinifyCss(gulp, preset) ]) new TaskSeries(gulp, 'lint', linters) -new TaskSeries(gulp, 'js', [eslint, rollups]) +new TaskSeries(gulp, 'js', [eslint, javascripts]) new TaskSeries(gulp, 'css', [scsslint, sass]) From 560af7340279af56f3ca9fb48d189b2311bb3e94 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Thu, 17 Mar 2016 15:11:07 -0500 Subject: [PATCH 16/39] working on gulp 4 integration --- .eslintrc | 3 ++- LICENSE.md | 12 +++++------- gulp-docs.js | 37 +++++++++++++++++++++---------------- gulpfile.babel.js | 44 ++++++++++++++++++++++++-------------------- package.json | 4 ++-- 5 files changed, 54 insertions(+), 46 deletions(-) diff --git a/.eslintrc b/.eslintrc index 8a3b043d..269959c9 100644 --- a/.eslintrc +++ b/.eslintrc @@ -4,7 +4,8 @@ "extends": "eslint:recommended", "env": { "browser": true, - "jquery": true + "jquery": true, + "es6": true } //, // "rules": { diff --git a/LICENSE.md b/LICENSE.md index 14411236..4199bf6f 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-2016, Federico Zivolo +Copyright (c) 2015-2016, Federico Zivolo and contributors - https://github.com/FezVrasta/bootstrap-material-design Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -23,10 +23,8 @@ SOFTWARE. ## Acknowledgements: -### Bootstrap -Some original Bootstrap tooling code and documentation http://getbootstrap.com -Copyright (c) 2011-2016 Twitter, Inc +- Some original Bootstrap code and documentation http://getbootstrap.com +`Copyright (c) 2011-2015 Twitter, Inc` -### MDL -Some original MDL code http://www.getmdl.io/ -Copyright 2015 Google Inc. All Rights Reserved. +- Some original MDL code http://www.getmdl.io/ +`Copyright 2015 Google Inc. All Rights Reserved.` diff --git a/gulp-docs.js b/gulp-docs.js index 7294679c..de59d179 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -1,4 +1,4 @@ -import {Preset, Clean, Copy, Jekyll, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' +import {Preset, Clean, Copy, Jekyll, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, parallel, series} from 'gulp-pipeline/src/index' const referenceDocNotice = `$1\n @@ -34,7 +34,7 @@ const prefix = {task: {prefix: 'docs:'}} export default function (gulp, options) { - let javascripts = [ + let javascripts = parallel(gulp, new RollupIife(gulp, preset, prefix, options.rollupConfig, { options: { dest: 'docs.iife.js', @@ -46,31 +46,34 @@ export default function (gulp, options) { source: {options: {cwd: 'docs/assets/js/vendor'}}, options: {dest: 'docs-vendor.min.js'} }) - ] + ) let eslint = new EsLint(gulp, preset, prefix) let scsslint = new ScssLint(gulp, preset, prefix, { source: {glob: ['**/*.scss', '!docs.scss']}, watch: {glob: ['**/*.scss', '!docs.scss']} }) - let linters = [scsslint, eslint] + let linters = parallel(gulp, scsslint, eslint) let sass = new Sass(gulp, preset, prefix) - new TaskSeries(gulp, 'default', [ + let recipes = series(gulp, new Clean(gulp, preset, prefix), linters, sass, javascripts, new MinifyCss(gulp, preset, prefix) - ], prefix) - new TaskSeries(gulp, 'lint', linters, prefix) - new TaskSeries(gulp, 'js', [eslint, javascripts], prefix) - new TaskSeries(gulp, 'css', [scsslint, sass], prefix) + ) + + new Aggregate(gulp, 'default', recipes, prefix) + new Aggregate(gulp, 'lint', linters, prefix) + new Aggregate(gulp, 'js', series(gulp, eslint, javascripts), prefix) + new Aggregate(gulp, 'css', series(gulp, scsslint, sass), prefix) // docs copy - new TaskSeries(gulp, 'copy:bs-docs', [ + new Aggregate(gulp, 'copy:bs-docs', parallel(gulp, new Copy(gulp, preset, prefix, { - task: {name: 'copy:bs-docs-content'}, + debug: true, + task: false, //{name: 'copy:bs-docs-content'}, source: { options: {cwd: '../bootstrap/docs/content'}, glob: ['**/*'] @@ -79,7 +82,7 @@ export default function (gulp, options) { process: copyProcessor }), new Copy(gulp, preset, prefix, { - task: {name: 'copy:bs-docs-components'}, + task: false, //{name: 'copy:bs-docs-components'}, source: { options: {cwd: '../bootstrap/docs/components'}, glob: ['**/*'] @@ -88,7 +91,7 @@ export default function (gulp, options) { process: copyProcessor }), new Copy(gulp, preset, prefix, { - task: {name: 'copy:bs-docs-scss'}, + task: false, //{name: 'copy:bs-docs-scss'}, source: { options: {cwd: '../bootstrap/docs/assets/scss'}, glob: ['**/*', '!docs.scss'] // keep variable customizations @@ -99,7 +102,7 @@ export default function (gulp, options) { } }), new Copy(gulp, preset, prefix, { - task: {name: 'copy:bs-docs-plugins'}, + task: false, //{name: 'copy:bs-docs-plugins'}, source: { options: {cwd: '../bootstrap/docs/_plugins'}, glob: ['**/*', '!bridge.rb'] @@ -107,7 +110,7 @@ export default function (gulp, options) { dest: 'docs/_plugins/' }), new Copy(gulp, preset, prefix, { - task: {name: 'copy:bs-docs-js-vendor'}, + task: false, //{name: 'copy:bs-docs-js-vendor'}, source: { options: {cwd: '../bootstrap/docs/assets/js/vendor'}, glob: [ @@ -118,5 +121,7 @@ export default function (gulp, options) { }, dest: 'docs/assets/js/vendor/' }, prefix) - ]) + )) + + return recipes } diff --git a/gulpfile.babel.js b/gulpfile.babel.js index b3d8f0b4..b7d469d1 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,4 +1,4 @@ -import {Preset, Clean, Copy, Jekyll, MinifyCss, Prepublish, PublishBuild, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index' +import {Preset, Clean, Copy, Jekyll, MinifyCss, Prepublish, PublishBuild, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline/src/index' import gulp from 'gulp' import findup from 'findup-sync' import pkg from './package.json' @@ -52,7 +52,7 @@ let rollupConfig = { } } -let javascripts = [ +let javascripts = parallel(gulp, new RollupEs(gulp, preset, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}}), new RollupUmd(gulp, preset, rollupConfig, { options: { @@ -65,34 +65,38 @@ let javascripts = [ 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) -let linters = [scsslint, eslint] +let linters = parallel(gulp, scsslint, eslint) -new TaskSeries(gulp, 'default', [ +let recipes = series(gulp, new Clean(gulp, preset), linters, - sass, - javascripts, + parallel(gulp, + sass, + javascripts + ), new MinifyCss(gulp, preset) -]) -new TaskSeries(gulp, 'lint', linters) -new TaskSeries(gulp, 'js', [eslint, javascripts]) -new TaskSeries(gulp, 'css', [scsslint, sass]) +) + +new Aggregate(gulp, 'default', recipes, {debug: true}) +new Aggregate(gulp, 'lint', linters) +new Aggregate(gulp, 'js', series(gulp, eslint, javascripts)) +new Aggregate(gulp, 'css', series(gulp, scsslint, sass)) -gulpDocs(gulp, {rollupConfig: rollupConfig}) +let docsDefaultRecipes = gulpDocs(gulp, {rollupConfig: rollupConfig}) - -// -let prepRelease = new TaskSeries(gulp, 'prep-release', [ - new Prepublish(gulp, preset), - 'default', - 'docs:default', +let prepRelease = new Aggregate(gulp, 'prep-release', [ + //new Prepublish(gulp, preset), // asserts committed + [ + recipes, + docsDefaultRecipes + ], new Copy(gulp, preset, { task: {name: 'copy:dist-to-docs'}, source: { @@ -105,7 +109,7 @@ let prepRelease = new TaskSeries(gulp, 'prep-release', [ ]) -new TaskSeries(gulp, 'publish', [ +new Aggregate(gulp, 'publish', [ prepRelease, new PublishBuild(gulp, preset, { npm: { diff --git a/package.json b/package.json index ae7161bb..d0eadaa2 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,8 @@ "babel-polyfill": "^6.6", "babel-preset-es2015": "^6.6.0", "extend": "^3.0.0", - "gulp": "^3.9.1", - "gulp-pipeline": "^0.4", + "gulp": "github:gulpjs/gulp#4.0", + "gulp-pipeline": "^4.0", "moment": "^2.11.2" }, "old-grunt-devDependencies": { From e697d242c345af9d1db699a32ad42b16fca6a485 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Thu, 17 Mar 2016 17:22:27 -0500 Subject: [PATCH 17/39] fixed docs prefix on copy --- gulp-docs.js | 3 +-- gulpfile.babel.js | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/gulp-docs.js b/gulp-docs.js index de59d179..1ed70c2c 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -72,7 +72,6 @@ export default function (gulp, options) { // docs copy new Aggregate(gulp, 'copy:bs-docs', parallel(gulp, new Copy(gulp, preset, prefix, { - debug: true, task: false, //{name: 'copy:bs-docs-content'}, source: { options: {cwd: '../bootstrap/docs/content'}, @@ -121,7 +120,7 @@ export default function (gulp, options) { }, dest: 'docs/assets/js/vendor/' }, prefix) - )) + ), prefix) return recipes } diff --git a/gulpfile.babel.js b/gulpfile.babel.js index b7d469d1..6c669ba3 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -7,6 +7,9 @@ import gulpDocs from './gulp-docs' const node_modules = findup('node_modules') +// we have a lot of aggregates, which add listeners +gulp.setMaxListeners(20) + let preset = Preset.baseline({ javascripts: { source: {options: {cwd: 'js/src'}}, @@ -91,12 +94,10 @@ new Aggregate(gulp, 'css', series(gulp, scsslint, sass)) let docsDefaultRecipes = gulpDocs(gulp, {rollupConfig: rollupConfig}) -let prepRelease = new Aggregate(gulp, 'prep-release', [ - //new Prepublish(gulp, preset), // asserts committed - [ - recipes, - docsDefaultRecipes - ], +let prepRelease = series(gulp, + new Prepublish(gulp, preset), // asserts committed + recipes, + docsDefaultRecipes, new Copy(gulp, preset, { task: {name: 'copy:dist-to-docs'}, source: { @@ -106,10 +107,11 @@ let prepRelease = new Aggregate(gulp, 'prep-release', [ dest: 'docs/dist/' }), new Jekyll(gulp, preset, {options: {raw: 'baseurl: "/bootstrap-material-design"'}}) -]) +) +new Aggregate(gulp, 'prep-release', prepRelease) -new Aggregate(gulp, 'publish', [ +new Aggregate(gulp, 'publish', series(gulp, prepRelease, new PublishBuild(gulp, preset, { npm: { @@ -117,4 +119,6 @@ new Aggregate(gulp, 'publish', [ publish: false } }) -]) + // FIXME: publish pages +)) + From 8410ac8322fd83aa685ce8d022d94a32b2e9b55d Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Thu, 17 Mar 2016 17:25:31 -0500 Subject: [PATCH 18/39] copied bootstrap docs --- docs/assets/scss/_ads.scss | 2 +- docs/assets/scss/_anchor.scss | 2 +- docs/assets/scss/_booticon.scss | 2 +- docs/assets/scss/_brand.scss | 2 +- docs/assets/scss/_browser-bugs.scss | 2 +- docs/assets/scss/_buttons.scss | 2 +- docs/assets/scss/_callouts.scss | 2 +- docs/assets/scss/_clipboard-js.scss | 2 +- docs/assets/scss/_component-examples.scss | 2 +- docs/assets/scss/_content.scss | 2 +- docs/assets/scss/_examples.scss | 2 +- docs/assets/scss/_featured-sites.scss | 2 +- docs/assets/scss/_featurettes.scss | 2 +- docs/assets/scss/_footer.scss | 2 +- docs/assets/scss/_masthead.scss | 2 +- docs/assets/scss/_nav.scss | 2 +- docs/assets/scss/_page-header.scss | 2 +- docs/assets/scss/_responsive-tests.scss | 2 +- docs/assets/scss/_sidebar.scss | 2 +- docs/assets/scss/_skiplink.scss | 2 +- docs/assets/scss/_syntax.scss | 2 +- docs/assets/scss/_team.scss | 2 +- docs/components/alerts.md | 2 +- docs/components/breadcrumb.md | 2 +- docs/components/button-dropdown.md | 2 +- docs/components/button-group.md | 2 +- docs/components/buttons.md | 2 +- docs/components/card.md | 2 +- docs/components/carousel.md | 2 +- docs/components/collapse.md | 2 +- docs/components/dropdowns.md | 2 +- docs/components/forms.md | 2 +- docs/components/input-group.md | 2 +- docs/components/jumbotron.md | 2 +- docs/components/list-group.md | 2 +- docs/components/modal.md | 2 +- docs/components/navbar.md | 2 +- docs/components/navs.md | 2 +- docs/components/pagination.md | 2 +- docs/components/popovers.md | 2 +- docs/components/progress.md | 2 +- docs/components/scrollspy.md | 2 +- docs/components/tag.md | 2 +- docs/components/tooltips.md | 2 +- docs/components/utilities.md | 2 +- docs/content/code.md | 2 +- docs/content/figures.md | 2 +- docs/content/images.md | 2 +- docs/content/reboot.md | 2 +- docs/content/tables.md | 2 +- docs/content/typography.md | 2 +- gulp-docs.js | 4 ++-- 52 files changed, 53 insertions(+), 53 deletions(-) diff --git a/docs/assets/scss/_ads.scss b/docs/assets/scss/_ads.scss index e1124f1f..aae5657f 100644 --- a/docs/assets/scss/_ads.scss +++ b/docs/assets/scss/_ads.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // scss-lint:disable ImportantRule diff --git a/docs/assets/scss/_anchor.scss b/docs/assets/scss/_anchor.scss index efaf0e2b..1db50828 100644 --- a/docs/assets/scss/_anchor.scss +++ b/docs/assets/scss/_anchor.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs .anchorjs-link { color: inherit; diff --git a/docs/assets/scss/_booticon.scss b/docs/assets/scss/_booticon.scss index a6bd2bb4..bae412be 100644 --- a/docs/assets/scss/_booticon.scss +++ b/docs/assets/scss/_booticon.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // // Bootstrap "B" Booticon diff --git a/docs/assets/scss/_brand.scss b/docs/assets/scss/_brand.scss index 4bf97b07..4f332808 100644 --- a/docs/assets/scss/_brand.scss +++ b/docs/assets/scss/_brand.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // // Brand guidelines diff --git a/docs/assets/scss/_browser-bugs.scss b/docs/assets/scss/_browser-bugs.scss index 41d65a22..83ade4c9 100644 --- a/docs/assets/scss/_browser-bugs.scss +++ b/docs/assets/scss/_browser-bugs.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // Wall of Browser Bugs // diff --git a/docs/assets/scss/_buttons.scss b/docs/assets/scss/_buttons.scss index c2c76d62..3af856bf 100644 --- a/docs/assets/scss/_buttons.scss +++ b/docs/assets/scss/_buttons.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // Buttons // diff --git a/docs/assets/scss/_callouts.scss b/docs/assets/scss/_callouts.scss index 354b9c03..00637cba 100644 --- a/docs/assets/scss/_callouts.scss +++ b/docs/assets/scss/_callouts.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // // Callouts diff --git a/docs/assets/scss/_clipboard-js.scss b/docs/assets/scss/_clipboard-js.scss index 5300df6f..fa1c3ce8 100644 --- a/docs/assets/scss/_clipboard-js.scss +++ b/docs/assets/scss/_clipboard-js.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // clipboard.js // diff --git a/docs/assets/scss/_component-examples.scss b/docs/assets/scss/_component-examples.scss index 7001d551..3b7942bb 100644 --- a/docs/assets/scss/_component-examples.scss +++ b/docs/assets/scss/_component-examples.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // scss-lint:disable QualifyingElement diff --git a/docs/assets/scss/_content.scss b/docs/assets/scss/_content.scss index aa3dbe50..5ad7ce7e 100644 --- a/docs/assets/scss/_content.scss +++ b/docs/assets/scss/_content.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // scss-lint:disable IdSelector, NestingDepth, SelectorDepth diff --git a/docs/assets/scss/_examples.scss b/docs/assets/scss/_examples.scss index ad53e374..38c35cf1 100644 --- a/docs/assets/scss/_examples.scss +++ b/docs/assets/scss/_examples.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // // Examples diff --git a/docs/assets/scss/_featured-sites.scss b/docs/assets/scss/_featured-sites.scss index 6c421ced..53e88948 100644 --- a/docs/assets/scss/_featured-sites.scss +++ b/docs/assets/scss/_featured-sites.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs .bd-featured-sites { margin-right: -1px; diff --git a/docs/assets/scss/_featurettes.scss b/docs/assets/scss/_featurettes.scss index 5c6e645e..9c921fce 100644 --- a/docs/assets/scss/_featurettes.scss +++ b/docs/assets/scss/_featurettes.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs .bd-featurette { padding-top: 3rem; diff --git a/docs/assets/scss/_footer.scss b/docs/assets/scss/_footer.scss index 2b44b06b..de211467 100644 --- a/docs/assets/scss/_footer.scss +++ b/docs/assets/scss/_footer.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // // Footer diff --git a/docs/assets/scss/_masthead.scss b/docs/assets/scss/_masthead.scss index c9805e5c..f4231d5b 100644 --- a/docs/assets/scss/_masthead.scss +++ b/docs/assets/scss/_masthead.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // scss-lint:disable ImportantRule diff --git a/docs/assets/scss/_nav.scss b/docs/assets/scss/_nav.scss index 642e9a39..721438eb 100644 --- a/docs/assets/scss/_nav.scss +++ b/docs/assets/scss/_nav.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // // Main navbar diff --git a/docs/assets/scss/_page-header.scss b/docs/assets/scss/_page-header.scss index be3115ac..d622ce2e 100644 --- a/docs/assets/scss/_page-header.scss +++ b/docs/assets/scss/_page-header.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // scss-lint:disable ImportantRule diff --git a/docs/assets/scss/_responsive-tests.scss b/docs/assets/scss/_responsive-tests.scss index 414ecb16..1b53545d 100644 --- a/docs/assets/scss/_responsive-tests.scss +++ b/docs/assets/scss/_responsive-tests.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // scss-lint:disable ImportantRule diff --git a/docs/assets/scss/_sidebar.scss b/docs/assets/scss/_sidebar.scss index 29f6e6e9..476665aa 100644 --- a/docs/assets/scss/_sidebar.scss +++ b/docs/assets/scss/_sidebar.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // // Side navigation diff --git a/docs/assets/scss/_skiplink.scss b/docs/assets/scss/_skiplink.scss index 7f4ae3d3..3b21302b 100644 --- a/docs/assets/scss/_skiplink.scss +++ b/docs/assets/scss/_skiplink.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs // scss-lint:disable IdSelector diff --git a/docs/assets/scss/_syntax.scss b/docs/assets/scss/_syntax.scss index 403a41de..b0851817 100644 --- a/docs/assets/scss/_syntax.scss +++ b/docs/assets/scss/_syntax.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs .hll { background-color: #ffc; } .c { color: #999; } diff --git a/docs/assets/scss/_team.scss b/docs/assets/scss/_team.scss index 22b7f810..55db5487 100644 --- a/docs/assets/scss/_team.scss +++ b/docs/assets/scss/_team.scss @@ -1,4 +1,4 @@ -// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs +// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs .bd-team { margin-bottom: 1.5rem; diff --git a/docs/components/alerts.md b/docs/components/alerts.md index 723cf9f5..70c73bc9 100644 --- a/docs/components/alerts.md +++ b/docs/components/alerts.md @@ -4,7 +4,7 @@ title: Alerts group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/breadcrumb.md b/docs/components/breadcrumb.md index b82a571e..3139bcac 100644 --- a/docs/components/breadcrumb.md +++ b/docs/components/breadcrumb.md @@ -4,7 +4,7 @@ title: Breadcrumb group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/button-dropdown.md b/docs/components/button-dropdown.md index 8f96a72d..8a025f94 100644 --- a/docs/components/button-dropdown.md +++ b/docs/components/button-dropdown.md @@ -4,7 +4,7 @@ title: Button dropdown group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/button-group.md b/docs/components/button-group.md index 8955d760..a37d2d6e 100644 --- a/docs/components/button-group.md +++ b/docs/components/button-group.md @@ -4,7 +4,7 @@ title: Button group group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/buttons.md b/docs/components/buttons.md index a728886a..e8f26528 100644 --- a/docs/components/buttons.md +++ b/docs/components/buttons.md @@ -5,7 +5,7 @@ group: components redirect_from: "/components/" --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/card.md b/docs/components/card.md index 66d19e65..ac5a24ff 100644 --- a/docs/components/card.md +++ b/docs/components/card.md @@ -4,7 +4,7 @@ title: Cards group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/carousel.md b/docs/components/carousel.md index 51af0fe5..302a8a08 100644 --- a/docs/components/carousel.md +++ b/docs/components/carousel.md @@ -4,7 +4,7 @@ title: Carousel group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/collapse.md b/docs/components/collapse.md index d094cf58..61cb6e88 100644 --- a/docs/components/collapse.md +++ b/docs/components/collapse.md @@ -4,7 +4,7 @@ title: Collapse group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/dropdowns.md b/docs/components/dropdowns.md index 25880afe..622e1a10 100644 --- a/docs/components/dropdowns.md +++ b/docs/components/dropdowns.md @@ -4,7 +4,7 @@ title: Dropdowns group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/forms.md b/docs/components/forms.md index 430c15e9..31ab04a5 100644 --- a/docs/components/forms.md +++ b/docs/components/forms.md @@ -4,7 +4,7 @@ title: Forms group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/input-group.md b/docs/components/input-group.md index 58788294..7d75d21d 100644 --- a/docs/components/input-group.md +++ b/docs/components/input-group.md @@ -4,7 +4,7 @@ title: Input group group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/jumbotron.md b/docs/components/jumbotron.md index b6649ad4..103e35e0 100644 --- a/docs/components/jumbotron.md +++ b/docs/components/jumbotron.md @@ -4,7 +4,7 @@ title: Jumbotron group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/list-group.md b/docs/components/list-group.md index 1e74905d..51c80253 100644 --- a/docs/components/list-group.md +++ b/docs/components/list-group.md @@ -4,7 +4,7 @@ title: List group group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/modal.md b/docs/components/modal.md index 2c43c5b1..9cd2648a 100644 --- a/docs/components/modal.md +++ b/docs/components/modal.md @@ -4,7 +4,7 @@ title: Modal group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/navbar.md b/docs/components/navbar.md index bca78508..bd9fae6e 100644 --- a/docs/components/navbar.md +++ b/docs/components/navbar.md @@ -4,7 +4,7 @@ title: Navbar group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/navs.md b/docs/components/navs.md index 85730d46..07f0d797 100644 --- a/docs/components/navs.md +++ b/docs/components/navs.md @@ -4,7 +4,7 @@ title: Navs group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/pagination.md b/docs/components/pagination.md index 6e9f86b1..44a54117 100644 --- a/docs/components/pagination.md +++ b/docs/components/pagination.md @@ -4,7 +4,7 @@ title: Pagination group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/popovers.md b/docs/components/popovers.md index c996f97e..3af9803e 100644 --- a/docs/components/popovers.md +++ b/docs/components/popovers.md @@ -4,7 +4,7 @@ title: Popovers group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/progress.md b/docs/components/progress.md index 0b7dc1a5..f2bd1548 100644 --- a/docs/components/progress.md +++ b/docs/components/progress.md @@ -4,7 +4,7 @@ title: Progress group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/scrollspy.md b/docs/components/scrollspy.md index 4e0b173b..0ee4f178 100644 --- a/docs/components/scrollspy.md +++ b/docs/components/scrollspy.md @@ -4,7 +4,7 @@ title: Scrollspy group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/tag.md b/docs/components/tag.md index 1e2c9242..8697a8ed 100644 --- a/docs/components/tag.md +++ b/docs/components/tag.md @@ -4,7 +4,7 @@ title: Tags group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/tooltips.md b/docs/components/tooltips.md index 2eb87a30..1addc2a7 100644 --- a/docs/components/tooltips.md +++ b/docs/components/tooltips.md @@ -4,7 +4,7 @@ title: Tooltips group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/components/utilities.md b/docs/components/utilities.md index 56df3937..6ddac1de 100644 --- a/docs/components/utilities.md +++ b/docs/components/utilities.md @@ -4,7 +4,7 @@ title: Utility classes group: components --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/content/code.md b/docs/content/code.md index 3ddac168..2b9509fd 100644 --- a/docs/content/code.md +++ b/docs/content/code.md @@ -4,7 +4,7 @@ title: Code group: content --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/content/figures.md b/docs/content/figures.md index 0357d38c..9210c8a0 100644 --- a/docs/content/figures.md +++ b/docs/content/figures.md @@ -4,7 +4,7 @@ title: Figures group: content --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/content/images.md b/docs/content/images.md index 6d481d13..1d99fb7d 100644 --- a/docs/content/images.md +++ b/docs/content/images.md @@ -4,7 +4,7 @@ title: Images group: content --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/content/reboot.md b/docs/content/reboot.md index 81cf2c64..32723892 100644 --- a/docs/content/reboot.md +++ b/docs/content/reboot.md @@ -5,7 +5,7 @@ group: content redirect_from: "/content/" --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/content/tables.md b/docs/content/tables.md index 817de4d5..a6bfd637 100644 --- a/docs/content/tables.md +++ b/docs/content/tables.md @@ -4,7 +4,7 @@ title: Tables group: content --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/docs/content/typography.md b/docs/content/typography.md index d2edfdc6..ea9dfa3d 100644 --- a/docs/content/typography.md +++ b/docs/content/typography.md @@ -4,7 +4,7 @@ title: Typography group: content --- -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs {% callout info %} **Bootstrap Reference Documentation** diff --git a/gulp-docs.js b/gulp-docs.js index 1ed70c2c..2f06f725 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -2,7 +2,7 @@ import {Preset, Clean, Copy, Jekyll, MinifyCss, Sass, RollupEs, RollupUmd, Rollu const referenceDocNotice = `$1\n -[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs\n +[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs\n {% callout info %}\n**Bootstrap Reference Documentation** This is a part of the reference documentation from Bootstrap. It is included here to demonstrate rendering with Material Design for Bootstrap default styling. @@ -97,7 +97,7 @@ export default function (gulp, options) { }, dest: 'docs/assets/scss/', process: (content, srcpath) => { - return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs\n\n$1'); + return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs\n\n$1'); } }), new Copy(gulp, preset, prefix, { From 8bf0a070b213b9dbcffd2bc451f6af5bfe2275b1 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Thu, 17 Mar 2016 18:50:12 -0500 Subject: [PATCH 19/39] work on gulp cssNano --- gulp-docs.js | 4 +-- gulpfile.babel.js | 68 ++++++++++++++++++++++++++++------------------- 2 files changed, 43 insertions(+), 29 deletions(-) diff --git a/gulp-docs.js b/gulp-docs.js index 2f06f725..a5a54391 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -1,4 +1,4 @@ -import {Preset, Clean, Copy, Jekyll, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, parallel, series} from 'gulp-pipeline/src/index' +import {Preset, Clean, Copy, Jekyll, CssNano, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, parallel, series} from 'gulp-pipeline/src/index' const referenceDocNotice = `$1\n @@ -61,7 +61,7 @@ export default function (gulp, options) { linters, sass, javascripts, - new MinifyCss(gulp, preset, prefix) + new CssNano(gulp, preset, prefix) ) new Aggregate(gulp, 'default', recipes, prefix) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 6c669ba3..1cbc8eb1 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,4 +1,4 @@ -import {Preset, Clean, Copy, Jekyll, MinifyCss, Prepublish, PublishBuild, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline/src/index' +import {Preset, Clean, Copy, Jekyll, CssNano, Prepublish, PublishBuild, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline/src/index' import gulp from 'gulp' import findup from 'findup-sync' import pkg from './package.json' @@ -23,6 +23,9 @@ let preset = Preset.baseline({ images: { source: {options: {cwd: 'images'}}, watch: {options: {cwd: 'images'}} + }, + postProcessor: { + dest: 'dist' //'dist/digest' } }) @@ -55,25 +58,45 @@ let rollupConfig = { } } -let javascripts = parallel(gulp, - new RollupEs(gulp, preset, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}}), - new RollupUmd(gulp, preset, rollupConfig, { - options: { - dest: 'bootstrap-material-design.umd.js', - moduleName: 'bootstrapMaterialDesign' - } - }), - new RollupIife(gulp, preset, rollupConfig, { - options: { - dest: 'bootstrap-material-design.iife.js', - moduleName: 'bootstrapMaterialDesign' - } +let javascripts = series(gulp, + parallel(gulp, + new RollupEs(gulp, preset, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}}), + new RollupUmd(gulp, preset, rollupConfig, { + options: { + dest: 'bootstrap-material-design.umd.js', + moduleName: 'bootstrapMaterialDesign' + } + }), + new RollupIife(gulp, preset, rollupConfig, { + options: { + dest: 'bootstrap-material-design.iife.js', + moduleName: 'bootstrapMaterialDesign' + } + })), + new Copy(gulp, preset, { + task: false, + source: { + options: {cwd: 'dist'}, + glob: ['*.iife*'] + }, + dest: 'docs/dist/' }) ) let eslint = new EsLint(gulp, preset) let scsslint = new ScssLint(gulp, preset) -let sass = new Sass(gulp, preset) +let sass = series(gulp, + new Sass(gulp, preset), + new CssNano(gulp, preset, {debug: true}), + new Copy(gulp, preset, { + task: false, + source: { + options: {cwd: 'dist'}, + glob: ['*.css*'] + }, + dest: 'docs/dist/' + }) +) let linters = parallel(gulp, scsslint, eslint) let recipes = series(gulp, @@ -82,11 +105,10 @@ let recipes = series(gulp, parallel(gulp, sass, javascripts - ), - new MinifyCss(gulp, preset) + ) ) -new Aggregate(gulp, 'default', recipes, {debug: true}) +new Aggregate(gulp, 'default', recipes) new Aggregate(gulp, 'lint', linters) new Aggregate(gulp, 'js', series(gulp, eslint, javascripts)) new Aggregate(gulp, 'css', series(gulp, scsslint, sass)) @@ -98,18 +120,10 @@ let prepRelease = series(gulp, new Prepublish(gulp, preset), // asserts committed recipes, docsDefaultRecipes, - new Copy(gulp, preset, { - task: {name: 'copy:dist-to-docs'}, - source: { - options: {cwd: 'dist'}, - glob: ['js/*.iife*', 'css/*.*'] - }, - dest: 'docs/dist/' - }), new Jekyll(gulp, preset, {options: {raw: 'baseurl: "/bootstrap-material-design"'}}) ) -new Aggregate(gulp, 'prep-release', prepRelease) +new Aggregate(gulp, 'prepRelease', prepRelease) new Aggregate(gulp, 'publish', series(gulp, prepRelease, From ff6af839e2c42f406f30cd1ddaf4c7f97c656db2 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Thu, 17 Mar 2016 18:51:05 -0500 Subject: [PATCH 20/39] not using sub directories for dist anymore --- docs/_includes/header-example.html | 4 ++-- docs/_includes/header.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_includes/header-example.html b/docs/_includes/header-example.html index b2d2e262..d72fcbef 100644 --- a/docs/_includes/header-example.html +++ b/docs/_includes/header-example.html @@ -6,7 +6,7 @@ {% if site.data.minified %} - + {% else %} - + {% endif %} diff --git a/docs/_includes/header.html b/docs/_includes/header.html index 528c804c..57b3fa7e 100644 --- a/docs/_includes/header.html +++ b/docs/_includes/header.html @@ -6,9 +6,9 @@ {% if site.data.minified %} - + {% else %} - + {% endif %} From 6f3ee97dc588c649b38f6f8423afe1545314f70d Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 11:33:45 -0500 Subject: [PATCH 21/39] move to jquery's recommended cdn, and make all cdns use https --- _config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index e104024f..de52c2d3 100644 --- a/_config.yml +++ b/_config.yml @@ -53,11 +53,11 @@ cdn: # js_hash: "sha384-XXXXXXXX" # fonts - font_roboto: http://fonts.googleapis.com/css?family=Roboto:300,400,500,700 + font_roboto: https://fonts.googleapis.com/css?family=Roboto:300,400,500,700 font_icons: https://fonts.googleapis.com/icon?family=Material+Icons # VERSION is substituted in variables.rb and these are made available as site.data.cdn.* - jquery: https://ajax.googleapis.com/ajax/libs/jquery/VERSION/jquery + jquery: https://code.jquery.com/jquery-VERSION bootstrap: https://cdn.rawgit.com/twbs/bootstrap/VERSION/dist/js/bootstrap tether: https://cdn.rawgit.com/HubSpot/tether/vVERSION/dist/js/tether From b8b2115e1598a29615f744ff0ffc284ba09f1884 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 11:34:06 -0500 Subject: [PATCH 22/39] use flat location for dist files --- docs/_includes/footer-example.html | 4 ++-- docs/_includes/footer.html | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/_includes/footer-example.html b/docs/_includes/footer-example.html index 599fbe41..f53c64c4 100644 --- a/docs/_includes/footer-example.html +++ b/docs/_includes/footer-example.html @@ -3,12 +3,12 @@ - + {% else %} - + {% endif %} diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html index a0f01f80..1b2534d7 100644 --- a/docs/_includes/footer.html +++ b/docs/_includes/footer.html @@ -17,15 +17,15 @@ - + {% if site.data.minified %} - + {% else %} - + {% endif %} From 1f2accb366d6131ce33561966bcba35ac50d0b4c Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 11:34:25 -0500 Subject: [PATCH 23/39] gulp default && jekyll serve is working locally --- gulp-docs.js | 6 ++++ gulpfile.babel.js | 73 ++++++++++++++++++++++++++++++----------------- 2 files changed, 53 insertions(+), 26 deletions(-) diff --git a/gulp-docs.js b/gulp-docs.js index a5a54391..63244c69 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -27,6 +27,12 @@ const preset = Preset.baseline({ source: {options: {cwd: 'docs/assets/scss'}}, watch: {options: {cwd: 'docs/assets/scss'}}, dest: 'docs/dist' + }, + images: { + dest: 'docs/dist' + }, + postProcessor: { + dest: 'docs/dist' } }) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 1cbc8eb1..376545f1 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,4 +1,4 @@ -import {Preset, Clean, Copy, Jekyll, CssNano, Prepublish, PublishBuild, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline/src/index' +import {Preset, Clean, Copy, Jekyll, CssNano, Prepublish, PublishBuild, PublishGhPages, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline/src/index' import gulp from 'gulp' import findup from 'findup-sync' import pkg from './package.json' @@ -10,7 +10,7 @@ const node_modules = findup('node_modules') // we have a lot of aggregates, which add listeners gulp.setMaxListeners(20) -let preset = Preset.baseline({ +const preset = Preset.baseline({ javascripts: { source: {options: {cwd: 'js/src'}}, watch: {options: {cwd: 'js/src'}}, @@ -35,7 +35,7 @@ let namedExports = {} //namedExports[`${node_modules}/corejs-typeahead/dist/bloodhound.js`] = ['Bloodhound'] //namedExports[`${node_modules}/anchor-js/anchor.js`] = ['AnchorJS'] -let rollupConfig = { +const rollupConfig = { options: { external: [ 'anchor-js', @@ -58,7 +58,16 @@ let rollupConfig = { } } -let javascripts = series(gulp, +const copyJsToDocs = new Copy(gulp, preset, { + task: {name: 'dist:js->docs'}, + source: { + options: {cwd: 'dist'}, + glob: ['*.iife.js'] + }, + dest: 'docs/dist/' +}) + +const javascripts = series(gulp, parallel(gulp, new RollupEs(gulp, preset, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}}), new RollupUmd(gulp, preset, rollupConfig, { @@ -72,30 +81,26 @@ let javascripts = series(gulp, dest: 'bootstrap-material-design.iife.js', moduleName: 'bootstrapMaterialDesign' } - })), - new Copy(gulp, preset, { - task: false, - source: { - options: {cwd: 'dist'}, - glob: ['*.iife*'] - }, - dest: 'docs/dist/' - }) + }) + ), + copyJsToDocs ) let eslint = new EsLint(gulp, preset) let scsslint = new ScssLint(gulp, preset) -let sass = series(gulp, +const copyCssToDocs = new Copy(gulp, preset, { + task: {name: 'dist:css->docs'}, + source: { + options: {cwd: 'dist'}, + glob: ['*.css'] + }, + dest: 'docs/dist/' +}) + +const sass = series(gulp, new Sass(gulp, preset), - new CssNano(gulp, preset, {debug: true}), - new Copy(gulp, preset, { - task: false, - source: { - options: {cwd: 'dist'}, - glob: ['*.css*'] - }, - dest: 'docs/dist/' - }) + new CssNano(gulp, preset), + copyCssToDocs ) let linters = parallel(gulp, scsslint, eslint) @@ -116,10 +121,18 @@ new Aggregate(gulp, 'css', series(gulp, scsslint, sass)) let docsDefaultRecipes = gulpDocs(gulp, {rollupConfig: rollupConfig}) -let prepRelease = series(gulp, +const buildControlConfig = { + options: { // see https://github.com/alienfast/build-control/blob/master/src/buildControl.js#L11 + //branch: 'v4-dist' + } +} + + +const prepRelease = series(gulp, new Prepublish(gulp, preset), // asserts committed recipes, - docsDefaultRecipes, + docsDefaultRecipes, // this cleans docs, so we need to re-copy dist to docs in this scenario + parallel(gulp, copyCssToDocs, copyJsToDocs), new Jekyll(gulp, preset, {options: {raw: 'baseurl: "/bootstrap-material-design"'}}) ) @@ -132,7 +145,15 @@ new Aggregate(gulp, 'publish', series(gulp, bump: false, publish: false } - }) + }), + // FIXME: publish pages + new PublishGhPages(gulp, preset, { + options: { + remote: { + repo: 'git@github.com:rosskevin/bootstrap-material-design.git' // FIXME: temporary, remove this option when we are deploying to our home repo + } + } + }) )) From 194f67f0cf270e4d23419edd825d4fff160313a3 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 11:41:37 -0500 Subject: [PATCH 24/39] prep for first push with gulp --- gulpfile.babel.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 376545f1..1c84323e 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -140,14 +140,7 @@ new Aggregate(gulp, 'prepRelease', prepRelease) new Aggregate(gulp, 'publish', series(gulp, prepRelease, - new PublishBuild(gulp, preset, { - npm: { - bump: false, - publish: false - } - }), - - // FIXME: publish pages + new PublishBuild(gulp, preset), new PublishGhPages(gulp, preset, { options: { remote: { From c03e48f023c41e1b6beaf0f96f430b419f0fb7eb Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 12:00:51 -0500 Subject: [PATCH 25/39] refactored for a simpler gulp file with reuse of aggregates now that it is possible --- .gitignore | 1 + gulpfile.babel.js | 134 +++++++++++++++++++++++----------------------- 2 files changed, 68 insertions(+), 67 deletions(-) diff --git a/.gitignore b/.gitignore index e5e2682d..4fbf4226 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Ignore the root dist as buildcontrol will place it on it's own branch (same for gh-pages) /dist +/build # Ignore docs dist files docs/dist/**/* diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 1c84323e..0a0a3abe 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -67,27 +67,6 @@ const copyJsToDocs = new Copy(gulp, preset, { dest: 'docs/dist/' }) -const javascripts = series(gulp, - parallel(gulp, - new RollupEs(gulp, preset, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}}), - new RollupUmd(gulp, preset, rollupConfig, { - options: { - dest: 'bootstrap-material-design.umd.js', - moduleName: 'bootstrapMaterialDesign' - } - }), - new RollupIife(gulp, preset, rollupConfig, { - options: { - dest: 'bootstrap-material-design.iife.js', - moduleName: 'bootstrapMaterialDesign' - } - }) - ), - copyJsToDocs -) - -let eslint = new EsLint(gulp, preset) -let scsslint = new ScssLint(gulp, preset) const copyCssToDocs = new Copy(gulp, preset, { task: {name: 'dist:css->docs'}, source: { @@ -97,56 +76,77 @@ const copyCssToDocs = new Copy(gulp, preset, { dest: 'docs/dist/' }) -const sass = series(gulp, - new Sass(gulp, preset), - new CssNano(gulp, preset), - copyCssToDocs -) -let linters = parallel(gulp, scsslint, eslint) - -let recipes = series(gulp, - new Clean(gulp, preset), - linters, - parallel(gulp, - sass, - javascripts +const js = new Aggregate(gulp, 'js', + series(gulp, + new EsLint(gulp, preset), + parallel(gulp, + new RollupEs(gulp, preset, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}}), + new RollupUmd(gulp, preset, rollupConfig, { + options: { + dest: 'bootstrap-material-design.umd.js', + moduleName: 'bootstrapMaterialDesign' + } + }), + new RollupIife(gulp, preset, rollupConfig, { + options: { + dest: 'bootstrap-material-design.iife.js', + moduleName: 'bootstrapMaterialDesign' + } + }) + ), + copyJsToDocs ) ) -new Aggregate(gulp, 'default', recipes) -new Aggregate(gulp, 'lint', linters) -new Aggregate(gulp, 'js', series(gulp, eslint, javascripts)) -new Aggregate(gulp, 'css', series(gulp, scsslint, sass)) - - -let docsDefaultRecipes = gulpDocs(gulp, {rollupConfig: rollupConfig}) - -const buildControlConfig = { - options: { // see https://github.com/alienfast/build-control/blob/master/src/buildControl.js#L11 - //branch: 'v4-dist' - } -} - - -const prepRelease = series(gulp, - new Prepublish(gulp, preset), // asserts committed - recipes, - docsDefaultRecipes, // this cleans docs, so we need to re-copy dist to docs in this scenario - parallel(gulp, copyCssToDocs, copyJsToDocs), - new Jekyll(gulp, preset, {options: {raw: 'baseurl: "/bootstrap-material-design"'}}) +const css = new Aggregate(gulp, 'css', + series(gulp, + new ScssLint(gulp, preset), + new Sass(gulp, preset), + new CssNano(gulp, preset), + copyCssToDocs + ) ) -new Aggregate(gulp, 'prepRelease', prepRelease) - -new Aggregate(gulp, 'publish', series(gulp, - prepRelease, - new PublishBuild(gulp, preset), - new PublishGhPages(gulp, preset, { - options: { - remote: { - repo: 'git@github.com:rosskevin/bootstrap-material-design.git' // FIXME: temporary, remove this option when we are deploying to our home repo - } - } - }) +const defaultRecipes = new Aggregate(gulp, 'default', series(gulp, + new Clean(gulp, preset), + parallel(gulp, + css, + js + ) )) +// load all docs tasks +let docsDefaultRecipes = gulpDocs(gulp, {rollupConfig: rollupConfig}) + +// publish +new Aggregate(gulp, 'publish', + + series(gulp, + new Prepublish(gulp, preset), // asserts committed + + defaultRecipes, + + docsDefaultRecipes, + + // ^^^docs:default cleans docs/dist, so we need to re-copy dist to docs in this scenario + parallel(gulp, copyCssToDocs, copyJsToDocs), + + new Jekyll(gulp, preset, {options: {raw: 'baseurl: "/bootstrap-material-design"'}}), + + new PublishBuild(gulp, preset, { + npm: { + bump: false, + publish: false + } + }), + + new PublishGhPages(gulp, preset, { + options: { + remote: { + repo: 'git@github.com:rosskevin/bootstrap-material-design.git' // FIXME: temporary, remove this option when we are deploying to our home repo + } + } + }) + ) +) + From 9e7986a78d0b347146f80236d02771fd8e913eef Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 12:20:01 -0500 Subject: [PATCH 26/39] refactored for a simpler docs gulp file with reuse of aggregates now that it is possible --- gulp-docs.js | 175 ++++++++++++++++++++++++++------------------------- 1 file changed, 91 insertions(+), 84 deletions(-) diff --git a/gulp-docs.js b/gulp-docs.js index 63244c69..13631a20 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -40,93 +40,100 @@ const prefix = {task: {prefix: 'docs:'}} export default function (gulp, options) { - let javascripts = parallel(gulp, - new RollupIife(gulp, preset, prefix, options.rollupConfig, { - options: { - dest: 'docs.iife.js', - moduleName: 'docs' - } - }), - new Uglify(gulp, preset, prefix, { - task: {name: 'vendor:uglify'}, - source: {options: {cwd: 'docs/assets/js/vendor'}}, - options: {dest: 'docs-vendor.min.js'} - }) - ) + const js = new Aggregate(gulp, 'js', + series(gulp, + new EsLint(gulp, preset, prefix), + parallel(gulp, + new RollupIife(gulp, preset, prefix, options.rollupConfig, { + options: { + dest: 'docs.iife.js', + moduleName: 'docs' + } + }), + new Uglify(gulp, preset, prefix, { + task: {name: 'vendor:uglify'}, + source: {options: {cwd: 'docs/assets/js/vendor'}}, + options: {dest: 'docs-vendor.min.js'} + }) + ) + ), + prefix) - let eslint = new EsLint(gulp, preset, prefix) - let scsslint = new ScssLint(gulp, preset, prefix, { - source: {glob: ['**/*.scss', '!docs.scss']}, - watch: {glob: ['**/*.scss', '!docs.scss']} - }) - let linters = parallel(gulp, scsslint, eslint) - let sass = new Sass(gulp, preset, prefix) + const css = new Aggregate(gulp, 'css', + series(gulp, + new ScssLint(gulp, preset, prefix, { + source: {glob: ['**/*.scss', '!docs.scss']}, + watch: {glob: ['**/*.scss', '!docs.scss']} + }), + new Sass(gulp, preset, prefix), + new CssNano(gulp, preset, prefix) + ), + prefix) - let recipes = series(gulp, - new Clean(gulp, preset, prefix), - linters, - sass, - javascripts, - new CssNano(gulp, preset, prefix) - ) - - new Aggregate(gulp, 'default', recipes, prefix) - new Aggregate(gulp, 'lint', linters, prefix) - new Aggregate(gulp, 'js', series(gulp, eslint, javascripts), prefix) - new Aggregate(gulp, 'css', series(gulp, scsslint, sass), prefix) + const defaultRecipes = new Aggregate(gulp, 'default', + series(gulp, + new Clean(gulp, preset, prefix), + parallel(gulp, + css, + js + ) + ), + prefix) // docs copy - new Aggregate(gulp, 'copy:bs-docs', parallel(gulp, - new Copy(gulp, preset, prefix, { - task: false, //{name: 'copy:bs-docs-content'}, - source: { - options: {cwd: '../bootstrap/docs/content'}, - glob: ['**/*'] - }, - dest: 'docs/content/', - process: copyProcessor - }), - new Copy(gulp, preset, prefix, { - task: false, //{name: 'copy:bs-docs-components'}, - source: { - options: {cwd: '../bootstrap/docs/components'}, - glob: ['**/*'] - }, - dest: 'docs/components/', - process: copyProcessor - }), - new Copy(gulp, preset, prefix, { - task: false, //{name: 'copy:bs-docs-scss'}, - source: { - options: {cwd: '../bootstrap/docs/assets/scss'}, - glob: ['**/*', '!docs.scss'] // keep variable customizations - }, - dest: 'docs/assets/scss/', - process: (content, srcpath) => { - return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs\n\n$1'); - } - }), - new Copy(gulp, preset, prefix, { - task: false, //{name: 'copy:bs-docs-plugins'}, - source: { - options: {cwd: '../bootstrap/docs/_plugins'}, - glob: ['**/*', '!bridge.rb'] - }, - dest: 'docs/_plugins/' - }), - new Copy(gulp, preset, prefix, { - task: false, //{name: 'copy:bs-docs-js-vendor'}, - source: { - options: {cwd: '../bootstrap/docs/assets/js/vendor'}, - glob: [ - '**/*', - '!tether.min.js', - '!jquery.min.js' - ] - }, - dest: 'docs/assets/js/vendor/' - }, prefix) - ), prefix) + new Aggregate(gulp, 'copy:bs-docs', + parallel(gulp, + new Copy(gulp, preset, prefix, { + task: false, //{name: 'copy:bs-docs-content'}, + source: { + options: {cwd: '../bootstrap/docs/content'}, + glob: ['**/*'] + }, + dest: 'docs/content/', + process: copyProcessor + }), + new Copy(gulp, preset, prefix, { + task: false, //{name: 'copy:bs-docs-components'}, + source: { + options: {cwd: '../bootstrap/docs/components'}, + glob: ['**/*'] + }, + dest: 'docs/components/', + process: copyProcessor + }), + new Copy(gulp, preset, prefix, { + task: false, //{name: 'copy:bs-docs-scss'}, + source: { + options: {cwd: '../bootstrap/docs/assets/scss'}, + glob: ['**/*', '!docs.scss'] // keep variable customizations + }, + dest: 'docs/assets/scss/', + process: (content, srcpath) => { + return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs\n\n$1'); + } + }), + new Copy(gulp, preset, prefix, { + task: false, //{name: 'copy:bs-docs-plugins'}, + source: { + options: {cwd: '../bootstrap/docs/_plugins'}, + glob: ['**/*', '!bridge.rb'] + }, + dest: 'docs/_plugins/' + }), + new Copy(gulp, preset, prefix, { + task: false, //{name: 'copy:bs-docs-js-vendor'}, + source: { + options: {cwd: '../bootstrap/docs/assets/js/vendor'}, + glob: [ + '**/*', + '!tether.min.js', + '!jquery.min.js' + ] + }, + dest: 'docs/assets/js/vendor/' + }, prefix) + ), + prefix) - return recipes + return defaultRecipes } From ad6634a439839588bfbb0459c01e7f5271008264 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 12:32:31 -0500 Subject: [PATCH 27/39] remove some old ignores clutter --- .gitignore | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 4fbf4226..dc0d27e6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,17 +3,13 @@ /dist /build -# Ignore docs dist files -docs/dist/**/* -docs/assets/css/* -docs/assets/js/dist/* -docs/assets/js/docs.* -js/dist/**/* - # Ignore docs files _gh_pages _site +# Ignore docs dist files +docs/dist/**/* + # Ignore ruby files .ruby-version .bundle From f0d6f54c50cfeaf36377649a0b01f512f119e91f Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 12:50:40 -0500 Subject: [PATCH 28/39] docs.min.css wasn't being generated --- gulp-docs.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gulp-docs.js b/gulp-docs.js index 13631a20..0d458257 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -32,6 +32,8 @@ const preset = Preset.baseline({ dest: 'docs/dist' }, postProcessor: { + source: {options: {cwd: 'docs/dist'}}, + watch: {options: {cwd: 'docs/dist'}}, dest: 'docs/dist' } }) From 58e460da937511865d38a70d0f725645fc702e90 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 14:05:41 -0500 Subject: [PATCH 29/39] fixed creation of uglified/min js for core and docs --- docs/assets/js/vendor/jekyll-search.js | 1 - gulp-docs.js | 8 ++++++-- gulpfile.babel.js | 5 +++++ package.json | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) delete mode 100644 docs/assets/js/vendor/jekyll-search.js diff --git a/docs/assets/js/vendor/jekyll-search.js b/docs/assets/js/vendor/jekyll-search.js deleted file mode 100644 index 32eba0f3..00000000 --- a/docs/assets/js/vendor/jekyll-search.js +++ /dev/null @@ -1 +0,0 @@ -!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o=0)}}module.exports=new LiteralSearchStrategy},{}],5:[function(require,module,exports){function setOptions(_opt){opt=_opt||{},opt.templatePattern=_opt.templatePattern||/\{(.*?)\}/g}function render(t,data){return t.replace(opt.templatePattern,function(match,prop){return data[prop]||match})}module.exports={render:render,setOptions:setOptions};var opt={};opt.templatePattern=/\{(.*?)\}/g},{}],6:[function(require,module,exports){!function(window,document,undefined){"use strict";function initWithJSON(json){store.put(opt.json),registerInput()}function initWithURL(url){jsonLoader.load(url,function(err,json){err?throwError("failed to get JSON ("+url+")"):(store.put(json),registerInput())})}function throwError(message){throw new Error("SimpleJekyllSearch --- "+message)}function validateOptions(_opt){for(var i=0;i{title}',noResultsText:"No results found",limit:10,fuzzy:!1,exclude:[]};window.SimpleJekyllSearch=function(_opt){opt=validateOptions(_opt),store.setOptions(_opt),isJSON(opt.json)?initWithJSON(opt.json):initWithURL(opt.json)},window.SimpleJekyllSearch.init=window.SimpleJekyllSearch}(window,document)},{"./JSONLoader":1,"./Repository":2,"./Templater":5}]},{},[6]); \ No newline at end of file diff --git a/gulp-docs.js b/gulp-docs.js index 0d458257..432aebdc 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -55,9 +55,13 @@ export default function (gulp, options) { new Uglify(gulp, preset, prefix, { task: {name: 'vendor:uglify'}, source: {options: {cwd: 'docs/assets/js/vendor'}}, - options: {dest: 'docs-vendor.min.js'} + concat: {dest: 'docs-vendor.min.js'} }) - ) + ), + new Uglify(gulp, preset, prefix, { + task: {name: 'iife:uglify'}, + source: { glob: '*.iife.js' } + }) ), prefix) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 0a0a3abe..dcb73f63 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -94,6 +94,11 @@ const js = new Aggregate(gulp, 'js', } }) ), + new Uglify(gulp, preset, { + task: {name: 'iife:uglify'}, + source: { glob: '*.iife.js' } + }), + copyJsToDocs ) ) diff --git a/package.json b/package.json index d0eadaa2..b3d94ec6 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "babel-preset-es2015": "^6.6.0", "extend": "^3.0.0", "gulp": "github:gulpjs/gulp#4.0", - "gulp-pipeline": "^4.0", + "gulp-pipeline": ">=4.0.3", "moment": "^2.11.2" }, "old-grunt-devDependencies": { From 0a255467497b7fe732f586ffc67cdab13287e915 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 14:12:19 -0500 Subject: [PATCH 30/39] Bumped version from 4.0.0-alpha to 4.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b3d94ec6..466e130b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bootstrap-material-design", "description": "Material Design for Bootstrap 4", - "version": "4.0.0-alpha", + "version": "4.0.0", "keywords": [ "material", "design", From 7bb15f3efad89dd598f1bd0defcd343024bd9372 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 14:18:47 -0500 Subject: [PATCH 31/39] Bumped version from 4.0.0 to 4.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 466e130b..8d4972b1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bootstrap-material-design", "description": "Material Design for Bootstrap 4", - "version": "4.0.0", + "version": "4.0.1", "keywords": [ "material", "design", From 64dd7d9bff3196215e72c03e43a526daf16b6298 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 14:32:26 -0500 Subject: [PATCH 32/39] added debug --- gulpfile.babel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index dcb73f63..90d1ead3 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -146,6 +146,7 @@ new Aggregate(gulp, 'publish', }), new PublishGhPages(gulp, preset, { + debug: true, options: { remote: { repo: 'git@github.com:rosskevin/bootstrap-material-design.git' // FIXME: temporary, remove this option when we are deploying to our home repo From 20258e80ee738a7274f93fae03f10e27f0af98cc Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 16:18:48 -0500 Subject: [PATCH 33/39] stable use of gulp-pipeline through unbundled cjs instead of direct at source. may switch back but this is verified working externally --- gulp-docs.js | 2 +- gulpfile.babel.js | 2 +- package.json | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gulp-docs.js b/gulp-docs.js index 432aebdc..725772e0 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -1,4 +1,4 @@ -import {Preset, Clean, Copy, Jekyll, CssNano, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, parallel, series} from 'gulp-pipeline/src/index' +import {Preset, Clean, Copy, Jekyll, CssNano, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, parallel, series} from 'gulp-pipeline' const referenceDocNotice = `$1\n diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 90d1ead3..a9fa0b43 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,4 +1,4 @@ -import {Preset, Clean, Copy, Jekyll, CssNano, Prepublish, PublishBuild, PublishGhPages, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline/src/index' +import {Preset, Clean, Copy, Jekyll, CssNano, Prepublish, PublishBuild, PublishGhPages, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline' import gulp from 'gulp' import findup from 'findup-sync' import pkg from './package.json' diff --git a/package.json b/package.json index 8d4972b1..923e7f31 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "tether": "^1.2.0" }, "devDependencies": { + "babel-core": "^6.7.2", "babel-eslint": "^5.0.0", "babel-polyfill": "^6.6", "babel-preset-es2015": "^6.6.0", From dad90768448073a9337fcb02a6fc899866ad2430 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 19:30:02 -0500 Subject: [PATCH 34/39] debugging gh-pages publishing --- gulpfile.babel.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index a9fa0b43..254fefee 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,4 +1,7 @@ -import {Preset, Clean, Copy, Jekyll, CssNano, Prepublish, PublishBuild, PublishGhPages, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline' +import {Preset, Clean, Copy, Jekyll, CssNano, Prepublish, PublishBuild, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline' + +import PublishGhPages from 'gulp-pipeline/src/publishGhPages' + import gulp from 'gulp' import findup from 'findup-sync' import pkg from './package.json' From aae68fce7d344cf213d31fefb72b7743d616a8df Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 19:35:22 -0500 Subject: [PATCH 35/39] switch back to module only, unlinked --- gulpfile.babel.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 254fefee..acbda717 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -1,6 +1,4 @@ -import {Preset, Clean, Copy, Jekyll, CssNano, Prepublish, PublishBuild, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline' - -import PublishGhPages from 'gulp-pipeline/src/publishGhPages' +import {Preset, Clean, Copy, Jekyll, CssNano, Prepublish, PublishBuild, PublishGhPages, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline' import gulp from 'gulp' import findup from 'findup-sync' From 8d3506c362d360208c8b509f165915bb217c8521 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 19:42:47 -0500 Subject: [PATCH 36/39] make sure iife.min is copied to docs dist --- gulpfile.babel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index acbda717..fd1b729c 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -63,7 +63,7 @@ const copyJsToDocs = new Copy(gulp, preset, { task: {name: 'dist:js->docs'}, source: { options: {cwd: 'dist'}, - glob: ['*.iife.js'] + glob: ['*.iife*.js'] }, dest: 'docs/dist/' }) From 98381d2589a3a0ffcf583c69354d24f39839dae6 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 19:44:35 -0500 Subject: [PATCH 37/39] add temporary estraverse-fb dependency based on bug in sub-library --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 923e7f31..c5fe2d64 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "tether": "^1.2.0" }, "devDependencies": { + "estraverse-fb": ">=1.3.1", "babel-core": "^6.7.2", "babel-eslint": "^5.0.0", "babel-polyfill": "^6.6", From 30be30c51c5e03aa70e7a1fa2550765b08ed6573 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 20:13:42 -0500 Subject: [PATCH 38/39] updated dependencies --- package.json | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/package.json b/package.json index c5fe2d64..162c83f9 100644 --- a/package.json +++ b/package.json @@ -45,46 +45,9 @@ "babel-preset-es2015": "^6.6.0", "extend": "^3.0.0", "gulp": "github:gulpjs/gulp#4.0", - "gulp-pipeline": ">=4.0.3", + "gulp-pipeline": ">=4.0.10", "moment": "^2.11.2" }, - "old-grunt-devDependencies": { - "autoprefixer": "^6.3.3", - "babel-eslint": "^5.0.0", - "babel-polyfill": "^6.6", - "babel-preset-es2015-rollup": "^1.1.1", - "btoa": "~1.1.2", - "glob": "~7.0.0", - "grunt": "~0.4.5", - "grunt-build-control": "~0.6.3", - "grunt-contrib-clean": "~1.0.0", - "grunt-contrib-compress": "~1.0.0", - "grunt-contrib-connect": "~0.11.2", - "grunt-contrib-copy": "~0.8.2", - "grunt-contrib-cssmin": "~0.14.0", - "grunt-contrib-qunit": "~1.0.1", - "grunt-contrib-uglify": "~0.11.1", - "grunt-contrib-watch": "~0.6.1", - "grunt-eslint": "^18.0.0", - "grunt-exec": "~0.4.6", - "grunt-html": "~6.0.0", - "grunt-jekyll": "~0.4.4", - "grunt-postcss": "^0.7.2", - "grunt-sass": "^1.1.0", - "grunt-saucelabs": "~8.6.2", - "grunt-scss-lint": "^0.3.8", - "grunt-stamp": "^0.1.0", - "is-travis": "^1.0.0", - "load-grunt-tasks": "~3.4.1", - "markdown-it": "^6.0.0", - "mq4-hover-shim": "^0.3.0", - "node-extend": "^0.2.0", - "npm-shrinkwrap": "^200.1.0", - "rollup": "^0.25", - "rollup-plugin-babel": "^2.4", - "rollup-plugin-multi-entry": "^1.1", - "time-grunt": "^1.3.0" - }, "engines": { "node": ">=0.10.1" }, From 3088171c6531f834760c92094a28a71cae729b7c Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Fri, 18 Mar 2016 20:44:22 -0500 Subject: [PATCH 39/39] update docs with removal of grunt --- Gruntfile.js | 637 ------------------------ _config.yml | 4 +- docs/getting-started/build-tools.md | 65 +-- docs/getting-started/introduction.md | 4 +- docs/getting-started/release-process.md | 30 +- 5 files changed, 29 insertions(+), 711 deletions(-) delete mode 100644 Gruntfile.js diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 62ef4a8f..00000000 --- a/Gruntfile.js +++ /dev/null @@ -1,637 +0,0 @@ -module.exports = function (grunt) { - 'use strict'; - - // Force use of Unix newlines - grunt.util.linefeed = '\n'; - - RegExp.quote = function (string) { - return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&'); - }; - - var referenceDocNotice = - '$1\n\n' - + '[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs\n\n' - + '{% callout info %}\n**Bootstrap Reference Documentation** \n' - + 'This is a part of the reference documentation from Bootstrap. \n' - + 'It is included here to demonstrate rendering with Material Design for Bootstrap default styling. \n' - + 'See the Material Design section for more elements and customization options.\n' - + '{% endcallout %}' - + '\n\n$2' - - var fs = require('fs'); - var path = require('path'); - var glob = require('glob'); - var isTravis = require('is-travis'); - var npmShrinkwrap = require('npm-shrinkwrap'); - var mq4HoverShim = require('mq4-hover-shim'); - var autoprefixer = require('autoprefixer')({ - browsers: [ - // - // Official browser support policy: - // http://v4-alpha.getbootstrap.com/getting-started/browsers-devices/#supported-browsers - // - 'Chrome >= 35', // Exact version number here is kinda arbitrary - // Rather than using Autoprefixer's native "Firefox ESR" version specifier string, - // we deliberately hardcode the number. This is to avoid unwittingly severely breaking the previous ESR in the event that: - // (a) we happen to ship a new Bootstrap release soon after the release of a new ESR, - // such that folks haven't yet had a reasonable amount of time to upgrade; and - // (b) the new ESR has unprefixed CSS properties/values whose absence would severely break webpages - // (e.g. `box-sizing`, as opposed to `background: linear-gradient(...)`). - // Since they've been unprefixed, Autoprefixer will stop prefixing them, - // thus causing them to not work in the previous ESR (where the prefixes were required). - 'Firefox >= 31', // Current Firefox Extended Support Release (ESR) - // Note: Edge versions in Autoprefixer & Can I Use refer to the EdgeHTML rendering engine version, - // NOT the Edge app version shown in Edge's "About" screen. - // For example, at the time of writing, Edge 20 on an up-to-date system uses EdgeHTML 12. - // See also https://github.com/Fyrd/caniuse/issues/1928 - 'Edge >= 12', - 'Explorer >= 9', - // Out of leniency, we prefix these 1 version further back than the official policy. - 'iOS >= 8', - 'Safari >= 8', - // The following remain NOT officially supported, but we're lenient and include their prefixes to avoid severely breaking in them. - 'Android 2.3', - 'Android >= 4', - 'Opera >= 12' - ] - }); - - // Project configuration. - grunt.initConfig({ - - // Metadata. - pkg: grunt.file.readJSON('package.json'), - banner: '/*!\n' + - ' * Bootstrap Material Design v<%= pkg.version %> (<%= pkg.homepage %>)\n' + - ' * Copyright 2014-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + - ' * Licensed under MIT (https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE)\n' + - ' */\n', - - // Task configuration. - clean: { - dist: 'dist', - 'dist-css': 'dist/css', - 'dist-js': 'dist/js', - 'docs-dist-js': 'docs/dist/js', - 'docs-dist-css': 'docs/dist/css' - }, - - sass: { - options: { - includePaths: ['scss', 'node_modules'], - precision: 6, - sourceComments: true, - sourceMap: true, - outputStyle: 'expanded' - }, - core: { - files: { - 'dist/css/<%= pkg.name %>.css': 'scss/<%= pkg.name %>.scss' - } - }, - docs: { - files: { - 'docs/dist/css/docs.css': 'docs/assets/scss/docs.scss' - } - } - }, - - eslint: { - options: { - configFile: 'js/.eslintrc' - }, - target: ['js/src/*.js', 'docs/assets/js/src/*.js'] - }, - - jscs: { - options: { - config: 'js/.jscsrc' - }, - grunt: { - src: ['Gruntfile.js', 'grunt/*.js'] - }, - core: { - src: 'js/src/*.js' - }, - test: { - src: 'js/tests/unit/*.js' - }, - docs: { - options: { - requireCamelCaseOrUpperCaseIdentifiers: null - }, - src: ['docs/assets/js/src/*.js', 'docs/assets/js/*.js', '!docs/assets/js/*.min.js'] - } - }, - - stamp: { - options: { - banner: '<%= banner %>\n' - }, - core: { - files: { - src: 'dist/js/*.js' - } - } - }, - - //concat: { - // options: { - // stripBanners: false, - // sourceMap: true - // }, - - uglify: { - options: { - compress: { - warnings: true - }, - mangle: false, - preserveComments: /^!|@preserve|@license|@cc_on/i - }, - - dist: { - files: { - 'dist/js/bootstrap-material-design.iife.min.js': 'dist/js/bootstrap-material-design.iife.js', - 'dist/js/bootstrap-material-design.umd.min.js': 'dist/js/bootstrap-material-design.umd.js' - //, - //'dist/js/bootstrap-material-design.es.min.js': 'dist/js/bootstrap-material-design.es.js' - } - }, - - 'docs-vendor': { - options: { - compress: false - }, - src: 'docs/assets/js/vendor/*.js', - //dest: 'docs/assets/js/docs.min.js' - dest: 'docs/dist/js/docs-vendor.min.js' - }, - docs: { - files: { - 'docs/dist/js/docs.iife.min.js': 'docs/dist/js/docs.iife.js' - } - } - }, - - qunit: { - options: { - inject: 'js/tests/unit/phantom.js' - }, - files: 'js/tests/index.html' - }, - - // CSS build configuration - scsslint: { - options: { - bundleExec: true, - config: 'scss/.scss-lint.yml', - reporterOutput: null - }, - core: { - src: ['scss/*.scss', '!scss/_normalize.scss'] - }, - docs: { - src: ['docs/assets/scss/*.scss', '!scss/_normalize.scss', '!docs/assets/scss/docs.scss'] - } - }, - - postcss: { - core: { - options: { - map: true, - processors: [ - mq4HoverShim.postprocessorFor({hoverSelectorPrefix: '.bs-true-hover '}), - autoprefixer - ] - }, - src: 'dist/css/*.css' - }, - docs: { - options: { - processors: [ - autoprefixer - ] - }, - src: 'docs/dist/css/*.css' - }, - examples: { - options: { - processors: [ - autoprefixer - ] - }, - expand: true, - cwd: 'docs/examples/', - src: ['**/*.css'], - dest: 'docs/examples/' - } - }, - - cssmin: { - options: { - // TODO: disable `zeroUnits` optimization once clean-css 3.2 is released - // and then simplify the fix for https://github.com/twbs/bootstrap/issues/14837 accordingly - compatibility: 'ie9', - keepSpecialComments: '*', - sourceMap: true, - advanced: false - }, - core: { - files: [ - { - expand: true, - cwd: 'dist/css', - src: ['*.css', '!*.min.css'], - dest: 'dist/css', - ext: '.min.css' - } - ] - }, - docs: { - files: [ - { - expand: true, - cwd: 'docs/dist/css', - src: ['*.css', '!*.min.css'], - dest: 'docs/dist/css', - ext: '.min.css' - } - ] - } - }, - - copy: { - //'dist-to-docs': { // for example templates - // expand: true, - // cwd: 'dist', - // src: [ - // 'js/*.iife*', - // 'css/*.*' - // ], - // dest: 'docs/dist/' - //}, - //'bs-docs-js-vendor': { - // expand: true, - // cwd: '../bootstrap/docs/assets/js/vendor', - // src: [ - // '**/*', - // '!tether.min.js', - // '!jquery.min.js' - // ], - // dest: 'docs/assets/js/vendor/' - //}, - //'bs-docs-plugins': { - // expand: true, - // cwd: '../bootstrap/docs/_plugins', - // src: ['**/*', '!bridge.rb'], - // dest: 'docs/_plugins/' - //}, - //'bs-docs-scss': { - // options: { - // // https://regex101.com/r/hG8lU4/1 - // process: function (content, srcpath) { - // return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs\n\n$1'); - // } - // }, - // expand: true, - // cwd: '../bootstrap/docs/assets/scss', - // src: [ - // '**/*', - // '!docs.scss' // keep variable customizations - // ], - // dest: 'docs/assets/scss/' - //}, - //'bs-docs-components': { - // options: { - // // //https://regex101.com/r/cZ7aO8/2 - // process: function (content, srcpath) { - // return content.replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice); - // } - // }, - // expand: true, - // cwd: '../bootstrap/docs/components', - // src: [ - // '**/*' - // ], - // dest: 'docs/components/' - //}, - //'bs-docs-getting-started': { - // options: { - // // https://regex101.com/r/cZ7aO8/2 - // process: function (content, srcpath) { - // return content - // // insert docs reference - // .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) - // // remove sample text 'display' as this is a particular style and is confusing - // .replace(/Fancy display heading/, 'Fancy heading'); - // } - // }, - // expand: true, - // cwd: '../bootstrap/docs/getting-started', - // src: [ - // 'browsers-devices.md' // only one file - // ], - // dest: 'docs/getting-started/' - //}, - //'bs-docs-content': { - // options: { - // // https://regex101.com/r/cZ7aO8/2 - // process: function (content, srcpath) { - // return content - // // insert docs reference - // .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) - // // remove sample text 'display' as this is a particular style and is confusing - // .replace(/Fancy display heading/, 'Fancy heading'); - // } - // }, - // expand: true, - // cwd: '../bootstrap/docs/content', - // src: [ - // '**/*' - // ], - // dest: 'docs/content/' - //} - }, - - connect: { - server: { - options: { - port: 3000, - base: '.' - } - } - }, - - //jekyll: { - // options: { - // bundleExec: true, - // config: '_config.yml', - // incremental: false - // }, - // docs: {}, - // github: { - // options: { - // //raw: 'github: true' - // raw: 'baseurl: "/bootstrap-material-design"' - // } - // } - //}, - - htmllint: { - options: { - ignore: [ - 'Element “img” is missing required attribute “src”.', - 'Attribute “autocomplete” is only allowed when the input type is “color”, “date”, “datetime”, “datetime-local”, “email”, “month”, “number”, “password”, “range”, “search”, “tel”, “text”, “time”, “url”, or “week”.', - 'Attribute “autocomplete” not allowed on element “button” at this point.', - 'Element “div” not allowed as child of element “progress” in this context. (Suppressing further errors from this subtree.)', - 'Consider using the “h1” element as a top-level heading only (all “h1” elements are treated as top-level headings by many screen readers and other tools).', - 'The “datetime” input type is not supported in all browsers. Please be sure to test, and consider using a polyfill.' - ] - }, - src: ['_gh_pages/**/*.html', 'js/tests/visual/*.html'] - }, - - watch: { - corejs: { - files: 'js/src/*.js', - tasks: ['dist-js'] - }, - docsjs: { // watch both the source and docs js - files: ['js/src/*.js', 'docs/assets/js/src/*.js'], - tasks: ['docs-js'] - }, - core: { - files: 'scss/**/*.scss', - tasks: ['dist-css'] - }, - docs: { // watch both the source and docs scss - files: ['docs/assets/scss/**/*.scss', 'scss/**/*.scss'], - tasks: ['scsslint:docs', 'sass:docs', 'postcss:docs'] - } - }, - - 'saucelabs-qunit': { - all: { - options: { - build: process.env.TRAVIS_JOB_ID, - concurrency: 10, - maxRetries: 3, - maxPollRetries: 4, - urls: ['http://127.0.0.1:3000/js/tests/index.html?hidepassed'], - browsers: grunt.file.readYAML('grunt/sauce_browsers.yml') - } - } - }, - - exec: { - npmUpdate: { - command: 'npm update' - }, - 'rollup-docs-iife': { - command: 'rollup -c grunt/rollup.docs.iife.config.js' - }, - 'rollup-iife': { - command: 'rollup -c grunt/rollup.iife.config.js' - }, - 'rollup-umd': { - command: 'rollup -c grunt/rollup.umd.config.js' - }, - 'rollup-es2015': { - command: 'rollup -c grunt/rollup.es.config.js' - } - }, - - buildcontrol: { - options: { - commit: true, - push: true, - remote: 'git@github.com:FezVrasta/bootstrap-material-design.git' - }, - pages: { - options: { - // FIXME: remove this when we are ready!!! - remote: 'git@github.com:rosskevin/bootstrap-material-design.git', - dir: '_gh_pages', - branch: 'gh-pages', - message: 'Built from commit %sourceCommit% on branch %sourceBranch%' - } - }, - dist: { - options: { - dir: 'dist', - branch: 'v4-dist', - message: 'dist from commit %sourceCommit% on branch %sourceBranch%' - } - } - }, - - compress: { - main: { - options: { - archive: 'bootstrap-material-design-<%= pkg.version %>-dist.zip', - mode: 'zip', - level: 9, - pretty: true - }, - files: [ - { - expand: true, - cwd: 'dist/', - src: ['**'], - dest: 'bootstrap-material-design-<%= pkg.version %>-dist' - } - ] - } - } - - }); - - // These plugins provide necessary tasks. - require('load-grunt-tasks')(grunt); - require('time-grunt')(grunt); - - // Docs HTML validation task - grunt.registerTask('validate-html', ['jekyll:docs', 'htmllint']); - - var runSubset = function (subset) { - return !process.env.MDB_TEST || process.env.MDB_TEST === subset; - }; - var isUndefOrNonZero = function (val) { - return val === undefined || val !== '0'; - }; - - // Test task. - var testSubtasks = []; - // Skip core tests if running a different subset of the test suite - 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']); - } - // Skip HTML validation if running a different subset of the test suite - if (runSubset('validate-html') && - isTravis && - // Skip HTML5 validator when [skip validator] is in the commit message - isUndefOrNonZero(process.env.MDB_DO_VALIDATOR)) { - testSubtasks.push('validate-html'); - } - // Only run Sauce Labs tests if there's a Sauce access key - if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' && - // Skip Sauce if running a different subset of the test suite - runSubset('sauce-js-unit') && - // Skip Sauce on Travis when [skip sauce] is in the commit message - isUndefOrNonZero(process.env.MDB_DO_SAUCE)) { - testSubtasks.push('babel:core'); - testSubtasks.push('connect'); - testSubtasks.push('saucelabs-qunit'); - } - grunt.registerTask('test', testSubtasks); - grunt.registerTask('test-js', ['eslint'/*, 'jscs:core', 'jscs:test', 'jscs:grunt'*/, 'qunit']); - - // JS distribution task. - grunt.registerTask('dist-js', [ - 'clean:dist-js', - 'eslint', - //'jscs:grunt', - //'jscs:core', - //'jscs:test', - 'exec:rollup-iife', - 'exec:rollup-umd', - 'exec:rollup-es2015', - 'stamp', - 'uglify:dist', - 'copy:dist-to-docs' - ]); - grunt.registerTask('docs-js', [ - 'clean:docs-dist-js', - 'copy:dist-to-docs', // ensure dist is present after cleaning - 'eslint', - //'jscs:docs', - 'exec:rollup-docs-iife', - 'uglify:docs', - 'uglify:docs-vendor' - ]); - - - grunt.registerTask('test-scss', ['scsslint:core']); - - // CSS distribution task. - grunt.registerTask('sass-compile', ['sass:core', 'sass:docs']); - - grunt.registerTask('dist-css', [ - 'scsslint:core', - 'clean:dist-css', - 'sass-compile', - 'postcss:core', - 'cssmin:core', - 'copy:dist-to-docs' - ]); - - grunt.registerTask('docs-css', [ - 'scsslint:docs', - 'clean:docs-dist-css', - 'copy:dist-to-docs', // ensure dist is present after cleaning - 'sass:docs', - 'postcss:docs', - 'postcss:examples', - 'cssmin:docs' - ]); - - // Full distribution task. - grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js', 'docs']); - - // Default task. - grunt.registerTask('default', ['clean:dist', 'test']); - //------ - // Docs tasks - - // Independent task to be run when we are ready to sync the bootstrap repo's docs locally. - // Should be automated with no need for intervention (other than pulling the right bootstrap release locally) - grunt.registerTask('docs-copy-bootstrap-docs', [ - 'copy:bs-docs-js-vendor', - 'copy:bs-docs-scss', - //'copy:bs-docs-getting-started', - 'copy:bs-docs-components', - 'copy:bs-docs-content', - 'copy:bs-docs-plugins' - ]); - - grunt.registerTask('docs', ['docs-css', 'docs-js']); - //------ - - //------ - // Release and publish - grunt.registerTask('prep-release', [ - //'update-shrinkwrap', - 'dist', - 'jekyll:github' // build site from scratch - //'compress' // compress zip - ]); - grunt.registerTask('publish', [ - 'prep-release', // build all including dist, docs, site - 'buildcontrol:dist', // push dist - 'buildcontrol:pages' // push site - ]); - //------ - - // Task for updating the cached npm packages used by the Travis build (which are controlled by test-infra/npm-shrinkwrap.json). - // This task should be run and the updated file should be committed whenever Bootstrap's dependencies change. - grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', '_update-shrinkwrap']); - grunt.registerTask('_update-shrinkwrap', function () { - var done = this.async(); - npmShrinkwrap({dev: true, dirname: __dirname}, function (err) { - if (err) { - grunt.fail.warn(err); - } - var dest = 'grunt/npm-shrinkwrap.json'; - fs.renameSync('npm-shrinkwrap.json', dest); - grunt.log.writeln('File ' + dest.cyan + ' updated.'); - done(); - }); - }); - - //grunt.registerTask('debug', function () { - // console.log(''); - //}); -}; diff --git a/_config.yml b/_config.yml index de52c2d3..c5d5b709 100644 --- a/_config.yml +++ b/_config.yml @@ -47,9 +47,9 @@ url: "http://rosskevin.github.io" # cdn: # # See https://www.srihash.org for info on how to generate the hashes - css: https://cdn.rawgit.com/fezvrasta/bootstrap-material-design/v4-dist/css/bootstrap-material-design.css + css: https://cdn.rawgit.com/FezVrasta/bootstrap-material-design/dist/dist/bootstrap-material-design.min.css # css_hash: "sha384-XXXXXXXX" - js: https://cdn.rawgit.com/fezvrasta/bootstrap-material-design/v4-dist/js/bootstrap-material-design + js: https://cdn.rawgit.com/fezvrasta/bootstrap-material-design/dist/dist/bootstrap-material-design # js_hash: "sha384-XXXXXXXX" # fonts diff --git a/docs/getting-started/build-tools.md b/docs/getting-started/build-tools.md index 76db3c07..2da62a6f 100644 --- a/docs/getting-started/build-tools.md +++ b/docs/getting-started/build-tools.md @@ -4,42 +4,36 @@ title: Build tools group: getting-started --- -Material Design for Bootstrap uses [Grunt](http://gruntjs.com) for its CSS and JavaScript build system and Jekyll for the written documentation. Our Gruntfile includes convenient methods for working with the framework, including compiling code, running tests, and more. +Material Design for Bootstrap uses [Gulp v4](http://gulpjs.com) for its CSS and JavaScript build system and Jekyll for the written documentation. Our gulpfile includes convenient methods for working with the framework, including compiling code, running tests, and more. ## Tooling setup -To use our Gruntfile and run our documentation locally, you'll need a copy of Material Design for Bootstrap's source files, Node, and Grunt. Follow these steps and you should be ready to rock: +To use our gulpfile and run our documentation locally, you'll need a copy of Material Design for Bootstrap's source files, Node, and Gulp v4. Follow these steps and you should be ready to rock: 1. [Download and install Node](https://nodejs.org/download), which we use to manage our dependencies. -2. Install the Grunt command line tools, `grunt-cli`, with `npm install -g grunt-cli`. +2. Install the Gulp command line tools, `gulp-cli`, with `npm install -g gulpjs/gulp-cli#4.0`. 3. Navigate to the root `/bootstrap-material-design` directory and run `npm install` to install our local dependencies listed in [package.json](https://github.com/FezVrasta/bootstrap-material-design/blob/master/package.json). -4. [Install RVM][install-rvm] +4. [Install RVM](http://rvm.io/rvm/install) 5. Install ruby. `cd bootstrap-material-design` and if installation is needed, it will give an install command such as `To install do: 'rvm install ruby-2.x.x'` -6. Install [Bundler][gembundler] with `gem install bundler` +6. Install Bundler with `gem install bundler` 7. Finally run `bundle install`. This will install all Ruby dependencies, such as Jekyll and plugins. - **Windows users:** Read [this unofficial guide](http://jekyll-windows.juthilo.com/) to get Jekyll up and running without problems. -When completed, you'll be able to run the various Grunt commands provided from the command line. +When completed, you'll be able to run the various Gulp commands provided from the command line to view them run `gulp --tasks` -[install-rvm]: https://rvm.io/rvm/install#1-download-and-run-the-rvm-installation-script -[gembundler]: http://bundler.io/ +## Using Gulp -## Using Grunt - -Our Gruntfile includes the following commands and tasks: +Our gulpfile includes the many tasks you can view with `gulp --tasks`, here are the important ones: | Task | Description | | --- | --- | -| `grunt` | Run `grunt` to run tests locally and compile the CSS and JavaScript into `/dist`. **Uses [Sass](http://sass-lang.com/), [Autoprefixer][autoprefixer], and [UglifyJS](http://lisperator.net/uglifyjs/).** | -| `grunt dist` | `grunt dist` creates the `/dist` directory with compiled files. **Uses [Sass](http://sass-lang.com/), [Autoprefixer][autoprefixer], and [UglifyJS](http://lisperator.net/uglifyjs/).** | -| `grunt test` | Runs [scss-lint](https://github.com/brigade/scss-lint), [ESLint](http://eslint.org/) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/) (used for CI). | -| `grunt docs` | Builds and tests CSS, JavaScript, and other assets which are used when running the documentation locally via `jekyll serve`. | -| `grunt watch` | This is a convenience method for watching just Sass files and automatically building them whenever you save. | - +| `gulp publish` | Run everything, publish dist, npm, and gh-pages | +| `gulp` | `gulp` runs the `default` task that builds all core files to the `dist` directory | +| `gulp docs:default` | creates all the `docs/dist` files needed to support the documentation | ## Autoprefixer -Material Design for Bootstrap uses [Autoprefixer][autoprefixer] (included in our Gruntfile and build process) to automatically add vendor prefixes to some CSS properties at build time. Doing so saves us time and code by allowing us to write key parts of our CSS a single time while eliminating the need for vendor mixins like those found in v3. +Material Design for Bootstrap uses [Autoprefixer][autoprefixer] (included in our gulpfile and build process) to automatically add vendor prefixes to some CSS properties at build time. Doing so saves us time and code by allowing us to write key parts of our CSS a single time while eliminating the need for vendor mixins like those found in v3. ## Local documentation @@ -49,7 +43,7 @@ markdown-based files, templates, and more. Here's how to get it started: 1. Run through the [tooling setup](#tooling-setup) above to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`. 2. From the root `/bootstrap-material-design` directory, run `bundle exec jekyll serve` in the command line. -3. Open in your browser, and voilà. +3. Open in your browser, and voilà. Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/). @@ -57,41 +51,24 @@ Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com The development and testing with the documentation has been connected so we not only can utilize Material Design examples, but all of the original Bootstrap documentation examples as well. The most productive environment so far is to have -Bootstrap checked out in parallel to this project, running three (3) different terminal commands simultaneously: +Bootstrap checked out in parallel to this project, running two (2) different terminal commands simultaneously: -1. _Terminal 1_: Bootstrap documentation for reference - - 1. Performs an initial dependency setup/build - - `bundle install && npm install && grunt dist` - - 1. Start serving the documentation on - - `jekyll serve` - -1. _Terminal 2_: Initial build and watch +1. _Terminal 1_: Initial build and watch 1. Performs an initial dependency setup/build - `bundle install && npm install && grunt dist` + `bundle install && npm install && gulp default && gulp docs:default` - 1. Watch both the core and docs sources for changes + 1. Watch both the core and docs sources for changes and build to the docs site - `grunt watch` + `grunt docs:default:watch` -1. _Terminal 3_: Start serving documentation on with `jekyll serve` +1. _Terminal 2_: Start serving documentation on with `jekyll serve` -Now go forth and develop, the `watch` task will keep tabs on source files and docs files, meanwhile the `jekyll serve` command -will generate new documentation pages with the changes. Simply refresh your browser to see the changes. +Now go forth and develop, the `docs:default:watch` task will keep tabs on source files and docs files, meanwhile the `jekyll serve` command will generate new documentation pages with the changes. Simply refresh your browser to see the changes. (TODO: someone please investigate adding autoreload to jekyll development cycle) ## Troubleshooting -Should you encounter problems with installing dependencies or running Grunt commands, uninstall all previous dependency versions (global and local). Then, rerun `npm install`. - -[ruby-sass]: https://github.com/sass/sass -[grunt-contrib-sass]: https://github.com/gruntjs/grunt-contrib-sass -[libsass]: https://github.com/sass/libsass -[grunt-sass]: https://github.com/sindresorhus/grunt-sass -[autoprefixer]: https://github.com/postcss/autoprefixer +Should you encounter problems with installing dependencies or running Gulp commands, uninstall all previous dependency versions (global and local). Then, rerun `rm -Rf node_modules && npm install`. diff --git a/docs/getting-started/introduction.md b/docs/getting-started/introduction.md index 361c808d..91c17335 100644 --- a/docs/getting-started/introduction.md +++ b/docs/getting-started/introduction.md @@ -32,7 +32,7 @@ Copy-paste the font and stylesheet `` into your `` before all other {% endhighlight %} -Add jQuery, Bootstrap, and our Javascript plugins near the end of your pages, right before the closing `` tag. Be sure to place jQuery first as our code depends on it. +Add jQuery, Tether, and our Javascript near the end of your pages, right before the closing `` tag. Be sure to place jQuery first as our code depends on it. {% highlight html %} @@ -76,7 +76,7 @@ Put it all together and your pages should look like this:

Hello, world!

- + diff --git a/docs/getting-started/release-process.md b/docs/getting-started/release-process.md index aafd3f5b..f2340165 100644 --- a/docs/getting-started/release-process.md +++ b/docs/getting-started/release-process.md @@ -4,7 +4,7 @@ title: Release process group: getting-started --- -Material Design for Bootstrap has a well defined release process that is automated by [Grunt](http://gruntjs.com). See the [Build Tools](../build-tools) section for setup. +Material Design for Bootstrap has a well defined release process that is automated by [Gulp](http://gulpjs.com). See the [Build Tools](../build-tools) section for setup. ## Creating a release @@ -13,36 +13,14 @@ Material Design for Bootstrap has a well defined release process that is automat Use the following task template: ~~~~~~~~ - - [] update `package.json` version - - [] `grunt prep-release` - - [] commit - - [] travis success - - [] tag for bower e.g. `v4.0.0` - - [] push to npm - - [] push to meteor - - [] `grunt publish` + - [] run `gulp publish` it will bump the version, build core, docs, gh-pages, publish them all (with a tag) and push to npm + - [] `meteor publish` - [] close any milestone - - [] create release and reference milestone issues + - [] create release from tag and reference milestone issues ~~~~~~~~ - -### Build the release -1. Update the version in `package.json`, it's version is used in the documentation -1. Build the distribution `grunt prep-release` -1. Commit -1. Ensure travis succeeds - -### Bower -Tag for bower - a valid tag starts with a `v` such as `v4.0.0` - -### NPM -`npm publish` - -### Meteor -TODO: push to meteor? ### Github tasks -1. Push documentation with `grunt publish` 1. Close any related open milestone 1. Create a release and reference the milestone