|
@ -8,10 +8,16 @@ import cleanCSS from 'gulp-clean-css' |
|
|
import rename from 'gulp-rename' |
|
|
import rename from 'gulp-rename' |
|
|
import consola from 'consola' |
|
|
import consola from 'consola' |
|
|
import { getOutput } from "@princess-ui/share"; |
|
|
import { getOutput } from "@princess-ui/share"; |
|
|
|
|
|
import rimraf from "rimraf" |
|
|
|
|
|
|
|
|
const distFolder = path.resolve(__dirname, 'dist') |
|
|
const distFolder = path.resolve(__dirname, 'dist') |
|
|
const distBundle = getOutput("theme-chalk") |
|
|
const distBundle = getOutput("theme-chalk") |
|
|
|
|
|
|
|
|
|
|
|
function clean(cb) { |
|
|
|
|
|
rimraf.sync(distBundle) |
|
|
|
|
|
cb() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* compile theme-chalk scss & minify |
|
|
* compile theme-chalk scss & minify |
|
|
* not use sass.sync().on('error', sass.logError) to throw exception |
|
|
* not use sass.sync().on('error', sass.logError) to throw exception |
|
@ -80,9 +86,9 @@ export function copyThemeChalkSource() { |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export const build = parallel( |
|
|
export const build = series(clean, parallel( |
|
|
copyThemeChalkSource, |
|
|
copyThemeChalkSource, |
|
|
series(buildThemeChalk, buildDarkCssVars, copyThemeChalkBundle) |
|
|
series(buildThemeChalk, buildDarkCssVars, copyThemeChalkBundle) |
|
|
) |
|
|
)) |
|
|
|
|
|
|
|
|
export default build |
|
|
export default build |