Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
|
075865c364 | ||
|
26945b4501 | ||
|
caf23d1fd2 |
1 changed files with 7 additions and 1 deletions
|
@ -2,6 +2,7 @@ const {src, dest, watch, parallel} = require('gulp')
|
||||||
const posthtml = require('gulp-posthtml')
|
const posthtml = require('gulp-posthtml')
|
||||||
const rename = require('gulp-rename')
|
const rename = require('gulp-rename')
|
||||||
const browserSync = require('browser-sync').create()
|
const browserSync = require('browser-sync').create()
|
||||||
|
const sourcemaps = require('gulp-sourcemaps')
|
||||||
|
|
||||||
const htmlFiles = [
|
const htmlFiles = [
|
||||||
'supernova/**/*.html',
|
'supernova/**/*.html',
|
||||||
|
@ -40,7 +41,7 @@ function html() {
|
||||||
root: 'supernova',
|
root: 'supernova',
|
||||||
plugins: posthtmlPlugins
|
plugins: posthtmlPlugins
|
||||||
}),
|
}),
|
||||||
require('posthtml-postcss')(postcssPlugins, /^text\/css$/),
|
require('posthtml-postcss')(postcssPlugins, {}, /^text\/css$/),
|
||||||
]))
|
]))
|
||||||
.pipe(rename(path => {
|
.pipe(rename(path => {
|
||||||
path.basename = 'index'
|
path.basename = 'index'
|
||||||
|
@ -61,7 +62,12 @@ const cssFiles = [
|
||||||
|
|
||||||
function css() {
|
function css() {
|
||||||
const stream = src(cssFiles)
|
const stream = src(cssFiles)
|
||||||
|
.pipe(sourcemaps.init())
|
||||||
.pipe(require('gulp-postcss')(postcssPlugins))
|
.pipe(require('gulp-postcss')(postcssPlugins))
|
||||||
|
.pipe(rename(path => {
|
||||||
|
path.basename = 'style'
|
||||||
|
}))
|
||||||
|
.pipe(sourcemaps.write())
|
||||||
.pipe(dest('supernova'))
|
.pipe(dest('supernova'))
|
||||||
|
|
||||||
if (browserSync.active) {
|
if (browserSync.active) {
|
||||||
|
|
Loading…
Reference in a new issue