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 + } + }) +])