docs gulp should watch core files as well

This commit is contained in:
Kevin Ross 2016-03-21 15:13:48 -05:00
parent 2bda49b00e
commit c38e14d28c
3 changed files with 12 additions and 6 deletions

View File

@ -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)
),

View File

@ -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',

View File

@ -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",