在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):electrode-io/electrode-gulp-helper开源软件地址(OpenSource Url):https://github.com/electrode-io/electrode-gulp-helper开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):electrode-gulp-helperHelper functions for managing gulp tasks loading and executing. UsageInstall:
const gulpHelper = require("electrode-gulp-helper");
gulpHelper.loadTasks( tasks ); APIloadTasksgulpHelper.loadTasks( tasks, gulp ) gulp - pass in gulp instance. If not provided, then it's attempted with tasks - should follow the spec below: {
"task1-name": taskData,
"task2-name": taskData
} Where taskData can be a taskData
stringIf it's a string, then it's treated as a shell command and executed using exec. functionIf it's a function, then it's to be called by gulp when it executes the task. It's passed to gulp like this.
If arrayIf it's an array, it specifies a list of tasks or group of tasks in a subarray to be executed sequentially. A group of tasks will be executed in parallel. Example:
The array is passed to run-sequence like this, with description being a stringified copy of the array.
objectIf it's an object, it should follow this spec: {
name: "task-name", // optional - use this instead of the key field for task name
dep: array, // optional - list of dependent tasks - follow definition above
desc: "description", // optional
task: string|function|array // follow the definitions above
} If the description field The gulp.task( `${taskName}$deps$`, false, () => runSequence.use(gulp).apply(null, taskData.dep) ); execgulpHelper.exec( shellCommand, [callback] ); Use shelljs If callback is provided, it will be called as follows:
If no callback is provided, it will return a Promise that rejects with the error or resolve with
envPath.addToFrontgulpHelper.envPath.addToFront(path); Add envPath.addToEndgulpHelper.envPath.addToEnd(path); Add envPath.addgulpHelper.envPath.add(path); If Built with |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论