UNPKG

sdin

Version:

JavaScript package builder.

2 lines 748 B
import e from"gulp";import s from"gulp-filter";import o from"gulp-uglify";import i from"gulp-clean-css";import{pipeline as m}from"../../utils/stream";import{outputJson as a}from"fs-extra";import{isNonEmptyDir as p}from"../../utils/path";async function r(r){var t,a;if(p(r.astSrc))return t=s("**/*.js",{restore:!0}),a=s("**/*.css",{restore:!0}),m(e.src("**/*",{cwd:r.astSrc}),t,o(),t.restore,a,i(),a.restore,e.dest(r.withTar(r.astPath)))}function t(r){var t;return a(r.withTar("manifest.json"),{name:r.name,path:r.path,astPath:r.astPath,index:null==(t=r.index)?void 0:t.name,error:null==(t=r.error)?void 0:t.name,pages:r.pages.map(r=>({name:r.name,path:r.path}))})}export{r as copyAssetsFiles,t as createManifest}; //# sourceMappingURL=tasks.js.map