2016-11-29 46 views
0

我正在处理我的第一个angularjs项目,并使用此框架生成器(https://www.npmjs.com/package/generator-leptir-angular-bootstrap)使用bootstrap与scss/less。从Gruntfile触发Gulp任务(手表)

leptir使用gulp来编译(这个工作正常),但是bower_component bootstrap使用grunt来编译。我的问题是,当我想修改bootstrap less文件时,我需要用grunt编译bootstrap.min.css,然后在父目录中重新运行gulp watch以编译带有bower和自定义scss的min.css,并且触发浏览器刷新等

我想知道的是,有没有办法,我可以直接从一个单独的gruntfile运行或人工触发gulpfile内一饮而尽任务(在这种情况下,一饮而尽手表)?

我在编译scss后尝试使用grunt.touch,但似乎没有触发gulp手表。任何其他想法?

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 

回答

0

因此,您在一个项目中使用Gulp和Grunt以及Less和Scss?这听起来很复杂,不需要很复杂。任何具体的原因,你去那个设置或发电机让你在那个位置?

我会建议将所有东西都移到gulp配置文件中,然后使用scss和scss避免混合。尽管在技术上可以工作,但我没有看到这样做的原因,并且它可能会增加源代码的复杂性码。

让我知道答复中的更多细节。