1

I am trying to deploy a static website from bitbucket to Netlify. It fails because "watch" is in waiting mode.

The logs from Netlify:

Done, without errors.
8:38:52 PM: Completed in 60.606s at Fri Dec 08 2017 17:38:43 GMT+0000 (UTC) - Waiting...

My Gruntfile.js configuration is:

watch: {
      options: {
         livereload: true,
         atBegin: true,
         interval: 1000,
         forever: false,
         // spawn: false,
         // interrupt: true,
         // debounceDelay: 3000
        },

Help me to make "watch" task end after building.

4

1 回答 1

0

正如上面评论中提到的那样,您的问题中需要更多关于您的配置的信息。

grunt 配置中需要有一个build目标,它不像 watch 那样使用本地开发服务器。

watch: {
  ....
},
build: {
  ....
}

您还需要按照以下命令注册任务:

grunt.registerTask('build', ['target1', 'target2']);

那么 Netlify 中的构建命令将是:grunt build而不是您正在使用的命令。

于 2017-12-09T19:16:41.977 回答