在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Klathmon/gulp-run-command开源软件地址(OpenSource Url):https://github.com/Klathmon/gulp-run-command开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-run-commandA simple way to run command-line programs from gulp in a cross-platform way. Installation
Usageimport gulp from 'gulp'
import run from 'gulp-run-command' // or `var run = require('gulp-run-command').default` for ES5
gulp.task('clean', run('rm -rf build'))
gulp.task('build', ['clean'], run('babel index.js --out-file index.es5.js', {
env: { NODE_ENV: 'production' }
})) APIrun(command, options)commandstype: A command will be run "as if you typed it in the console". An array of commands will be run sequentially (waiting for each to finish before the next begins), stdin will be blank for all commands. Commands will be run like they are from options.quiettype: Setting to options.ignoreErrorstype: Setting to options.cwdtype: Sets the current working directory for the command. This is where the options.timeouttype: The max time (in milliseconds) that the command is allowed to run options.envtype: This object will be added to the normal environment, overwriting defaults with what you pass in. So if your "main" environment includes FAQWhy? What not just use Can you add this new feature? Gulp@4 support gulp.task('clean', async () => run('echo "Hello World!"')()); Inspiration
ContributingThe code is written in ES6 using Javascript Standard Style. Feel free to make PRs adding features you want, but please try to follow Standard. Also, codumentation/readme PRs are more then welcome! LicenseMIT Copyright (c) Gregory Benner |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论