【问题标题】:Aurelia CLI and Gulp ShellAurelia CLI 和 Gulp Shell
【发布时间】:2016-10-09 22:51:39
【问题描述】:

有没有办法从特定文件夹的上下文中执行au build

我的文件夹结构是:

- UI
  |-main
  | | <aurelia_project_here>
  |
  |-another
  | | <aurelia_project_here>
  |
  |-gulpfile.js

我的gulpfile.js 看起来像:

var gulp = require('gulp'),
    shell = require('gulp-shell');

gulp.task('build-main', shell.task(['cd main', 'au build', 'cd ..']));
gulp.task('build-another', shell.task(['cd another', 'au build', 'cd ..']));

gulp.task('build', gulp.parallel('build-main', 'build-another', done => done()));

我需要在各个 aurelia 项目目录的上下文中执行 shell....除非您可以将它们指定给 aurelia cli

【问题讨论】:

    标签: javascript gulp aurelia gulp-shell


    【解决方案1】:

    使用cwd optiongulp-shell

    gulp.task('build-main', shell.task('au build', {cwd:'main'}));
    gulp.task('build-another', shell.task('au build', {cwd:'another'}));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-01-03
      • 1970-01-01
      • 2018-03-11
      • 2018-05-13
      • 1970-01-01
      • 2017-06-26
      • 1970-01-01
      相关资源
      最近更新 更多