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 rename = require('gulp-rename')
|
||||
const browserSync = require('browser-sync').create()
|
||||
const sourcemaps = require('gulp-sourcemaps')
|
||||
|
||||
const htmlFiles = [
|
||||
'supernova/**/*.html',
|
||||
|
@ -40,7 +41,7 @@ function html() {
|
|||
root: 'supernova',
|
||||
plugins: posthtmlPlugins
|
||||
}),
|
||||
require('posthtml-postcss')(postcssPlugins, /^text\/css$/),
|
||||
require('posthtml-postcss')(postcssPlugins, {}, /^text\/css$/),
|
||||
]))
|
||||
.pipe(rename(path => {
|
||||
path.basename = 'index'
|
||||
|
@ -61,7 +62,12 @@ const cssFiles = [
|
|||
|
||||
function css() {
|
||||
const stream = src(cssFiles)
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(require('gulp-postcss')(postcssPlugins))
|
||||
.pipe(rename(path => {
|
||||
path.basename = 'style'
|
||||
}))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(dest('supernova'))
|
||||
|
||||
if (browserSync.active) {
|
||||
|
|
Loading…
Reference in a new issue