From c38e14d28cb99cfb308ab8ae496bf4a0a9b9ac23 Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Mon, 21 Mar 2016 15:13:48 -0500 Subject: [PATCH] docs gulp should watch core files as well --- gulp-docs.js | 11 +++++++++-- gulpfile.babel.js | 2 +- package.json | 5 ++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gulp-docs.js b/gulp-docs.js index 725772e0..f9acd740 100644 --- a/gulp-docs.js +++ b/gulp-docs.js @@ -1,5 +1,10 @@ import {Preset, Clean, Copy, Jekyll, CssNano, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, parallel, series} from 'gulp-pipeline' +// since we are using a docs cwd, we need to grap the source path to watch both docs js and core js +import findup from 'findup-sync' +const coreJs = findup('js') +const coreScss = findup('scss') + const referenceDocNotice = `$1\n [//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs-docs\n @@ -40,11 +45,12 @@ const preset = Preset.baseline({ const prefix = {task: {prefix: 'docs:'}} -export default function (gulp, options) { +export default function (gulp, corePreset, options) { const js = new Aggregate(gulp, 'js', series(gulp, new EsLint(gulp, preset, prefix), + new EsLint(gulp, corePreset, {task: false}), // lint the core as well - easier for development parallel(gulp, new RollupIife(gulp, preset, prefix, options.rollupConfig, { options: { @@ -60,7 +66,7 @@ export default function (gulp, options) { ), new Uglify(gulp, preset, prefix, { task: {name: 'iife:uglify'}, - source: { glob: '*.iife.js' } + source: {glob: '*.iife.js', options: {ignore: ['*.iife.min.js', 'bootstrap*.js']}} }) ), prefix) @@ -71,6 +77,7 @@ export default function (gulp, options) { source: {glob: ['**/*.scss', '!docs.scss']}, watch: {glob: ['**/*.scss', '!docs.scss']} }), + new ScssLint(gulp, corePreset, {task: false}), // lint the core as well - easier for development new Sass(gulp, preset, prefix), new CssNano(gulp, preset, prefix) ), diff --git a/gulpfile.babel.js b/gulpfile.babel.js index fd1b729c..9ba44809 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -122,7 +122,7 @@ const defaultRecipes = new Aggregate(gulp, 'default', series(gulp, )) // load all docs tasks -let docsDefaultRecipes = gulpDocs(gulp, {rollupConfig: rollupConfig}) +let docsDefaultRecipes = gulpDocs(gulp, preset, {rollupConfig: rollupConfig}) // publish new Aggregate(gulp, 'publish', diff --git a/package.json b/package.json index 162c83f9..daef480f 100644 --- a/package.json +++ b/package.json @@ -34,14 +34,13 @@ "license": "MIT", "dependencies": { "bootstrap": "twbs/bootstrap#v4-dev", + "babel-polyfill": "^6.6", "jquery": "^2.2", "tether": "^1.2.0" }, "devDependencies": { - "estraverse-fb": ">=1.3.1", "babel-core": "^6.7.2", - "babel-eslint": "^5.0.0", - "babel-polyfill": "^6.6", + "babel-eslint": ">=6.0.0-beta.6", "babel-preset-es2015": "^6.6.0", "extend": "^3.0.0", "gulp": "github:gulpjs/gulp#4.0",