簡體   English   中英

拆分咕unt的監視任務

[英]splitting grunt watch tasks

所以我有5個grunt-contrib-watch任務:

  • sass編譯sass文件
  • testConcat到concat測試
  • ImplementationConcat將concat實現文件進行測試
  • 預編譯車把模板的模板
  • 因果報應開始因果報應測試

我知道grunt watch會監視所有的人,但是我確實需要將它們分為兩組-前四組是針對我的設計師運行靜態服務器並進行sass工作時使用的,后兩組是針對我進行工作時的使用的js的工作。

我正在使用grunt-concurrent來拆分它們並同時運行它們,但是雖然可行,但似乎有點破爛。 我想念什么嗎?

除非我缺少任何東西,否則我認為這非常簡單。 您甚至不一定需要並發。

watch: {
  design: {
    files:[ 'foo/designFile.scss', 'foo/testwhatever' ],
    tasks: [ 'sass', 'testConcat', etc... ]
  },
  dev: {
    files:[ 'foo/files.hbars', 'foo/file.test' ],
    tasks: [ 'templates', 'karma' ]
  }
}

當您要運行grunt watch時,而不是僅運行grunt watch ,請指定您想要的grunt watch:designgrunt watch:dev

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM