【发布时间】:2016-11-29 00:15:19
【问题描述】:
我正在开发我的第一个 angularjs 项目,并使用这个框架生成器 (https://www.npmjs.com/package/generator-leptir-angular-bootstrap) 来使用带有 scss/less 的引导程序。
leptir 使用 gulp 编译(这工作正常),但 bower_component 引导程序使用 grunt 编译。我的问题是,当我想修改 bootstrap less 文件时,我需要使用 grunt 编译 bootstrap.min.css,然后在父目录中重新运行 gulp watch 以使用 bower 和自定义 scss 编译 min.css,并触发浏览器刷新等
我想知道的是,有没有一种方法可以从单独的 gruntfile 中直接运行或人工触发 gulpfile 中的 gulp 任务(在本例中为 gulp watch)?
我在 scss 编译后尝试使用 grunt.touch,但这似乎不会触发 gulp watch。还有其他想法吗?
my-project
|- public
|- bower_components
|- bootstrap
|- less (directory of all my bootstrap less files)
|- Gruntfile.js
|- package.json
|- app.scss (when changed, triggers gulp.watch)
|- gulpfile.js
|- package.json
【问题讨论】: