supernova: add gulp-sourcemaps, rename css
This commit is contained in:
parent
caf23d1fd2
commit
26945b4501
1 changed files with 6 additions and 0 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',
|
||||||
|
@ -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(sourcemaps.write())
|
||||||
|
.pipe(rename(path => {
|
||||||
|
path.basename = 'style'
|
||||||
|
}))
|
||||||
.pipe(dest('supernova'))
|
.pipe(dest('supernova'))
|
||||||
|
|
||||||
if (browserSync.active) {
|
if (browserSync.active) {
|
||||||
|
|
Loading…
Reference in a new issue