mirror of
https://github.com/Laxilef/OTGateway.git
synced 2026-11-30 10:13:04 +05:00
build: name generated asset tasks
This commit is contained in:
1 parent
40905cf0a1
commit
58806dbcca
1 file changed
+12
-4
+12
-4
@@ -70,7 +70,7 @@ let paths = {
|
|||||||
|
|
||||||
// Tasks
|
// Tasks
|
||||||
const styles = parallel(...Object.entries(paths.styles.bundles).map(([name, items]) => {
|
const styles = parallel(...Object.entries(paths.styles.bundles).map(([name, items]) => {
|
||||||
return () => src(items)
|
const task = () => src(items)
|
||||||
.pipe(replace(
|
.pipe(replace(
|
||||||
"{BUILD_TIME}",
|
"{BUILD_TIME}",
|
||||||
Math.floor(Date.now() / 1000)
|
Math.floor(Date.now() / 1000)
|
||||||
@@ -83,10 +83,12 @@ const styles = parallel(...Object.entries(paths.styles.bundles).map(([name, item
|
|||||||
append: true
|
append: true
|
||||||
}))
|
}))
|
||||||
.pipe(dest(paths.styles.dest));
|
.pipe(dest(paths.styles.dest));
|
||||||
|
task.displayName = name;
|
||||||
|
return task;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const scripts = parallel(...Object.entries(paths.scripts.bundles).map(([name, items]) => {
|
const scripts = parallel(...Object.entries(paths.scripts.bundles).map(([name, items]) => {
|
||||||
return () => src(items)
|
const task = () => src(items)
|
||||||
.pipe(replace(
|
.pipe(replace(
|
||||||
"{BUILD_TIME}",
|
"{BUILD_TIME}",
|
||||||
Math.floor(Date.now() / 1000)
|
Math.floor(Date.now() / 1000)
|
||||||
@@ -97,10 +99,12 @@ const scripts = parallel(...Object.entries(paths.scripts.bundles).map(([name, it
|
|||||||
append: true
|
append: true
|
||||||
}))
|
}))
|
||||||
.pipe(dest(paths.scripts.dest));
|
.pipe(dest(paths.scripts.dest));
|
||||||
|
task.displayName = name;
|
||||||
|
return task;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const jsonFiles = parallel(...paths.json.map((item) => {
|
const jsonFiles = parallel(...paths.json.map((item) => {
|
||||||
return () => src(item.src)
|
const task = () => src(item.src)
|
||||||
.pipe(replace(
|
.pipe(replace(
|
||||||
"{BUILD_TIME}",
|
"{BUILD_TIME}",
|
||||||
Math.floor(Date.now() / 1000)
|
Math.floor(Date.now() / 1000)
|
||||||
@@ -110,14 +114,18 @@ const jsonFiles = parallel(...paths.json.map((item) => {
|
|||||||
append: true
|
append: true
|
||||||
}))
|
}))
|
||||||
.pipe(dest(item.dest));
|
.pipe(dest(item.dest));
|
||||||
|
task.displayName = item.src;
|
||||||
|
return task;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const staticFiles = parallel(...paths.static.map((item) => {
|
const staticFiles = parallel(...paths.static.map((item) => {
|
||||||
return () => src(item.src, { encoding: false })
|
const task = () => src(item.src, { encoding: false })
|
||||||
.pipe(gzip({
|
.pipe(gzip({
|
||||||
append: true
|
append: true
|
||||||
}))
|
}))
|
||||||
.pipe(dest(item.dest));
|
.pipe(dest(item.dest));
|
||||||
|
task.displayName = item.src;
|
||||||
|
return task;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const pages = () => {
|
const pages = () => {
|
||||||
|
|||||||
Reference in new issue
Block a user