yeoman - 升级 yo grunt-cli Bower 后实时重新加载不起作用

标签 yeoman gruntjs bower

我刚刚构建了 Nodejs 并安装了 0.10.6,然后卸载了 yo+grunt-cli+bower+generator-webapp 并使用 npm -g 重新安装到最新版本,
哟网络应用
但现在实时重新加载不起作用,在 chrome devtools 中也看不到任何错误

哟-v:1.0beta5
grunt-cli v0.1.8 和 grunt v0.4.1
鲍尔-v:0.9.2
节点-v:0.10.6
npm -v:1.2.18

grunt 服务器显示监视任务:时间+文件名已更改

尝试:将 Gruntfile 中的端口号更改为.. LIVERELOAD_PORT = 34729;不:(
我的旧 webapp 项目仍然工作正常
迷失了..

谢谢
--------------------- 更新
1. 将 lrSnippet 移至 Grunfile.js 中的第 1 个位置
2.在index.js中移动

    end.call(res, res.data, encoding);

在 if block 之外

现在可以部分使用了:
摘要:
1. 更改index.html > 重新加载即可
2. 更改 main.scss > 重新加载即可
3. 更改 my.sass > 不正常

第三步之后
1. 更改index.html > 不行
2. 更改 main.scss > 不正常

4. 更改 hello.coffe > 不正常
第 4 步之后
1. 修改index.html > ok
2.更改main.scss > ok

//-------------------------------------index.html
对index.html的更改
重新加载即可
grunt 服务器窗口记录更改并发出重新加载命令

grunt 服务器窗口抓取=

    Running "watch" task
    Waiting...OK
    >> File "app/index.html" changed.

    Running "watch" task
    ... Reload app/index.html ...
    Completed in 0.002s at Sat May 18 2013 12:47:58 GMT+0530 (IST) - Waiting...

//------------------------------------- main.scss
对 main.scss 的更改
重新加载即可
grunt 服务器窗口抓取 =

    >> File "app/styles/main.scss" changed.

    Running "compass:server" (compass) task
    overwrite .tmp/styles/main.css 
    unchanged app/styles/my.sass

    Running "watch" task
    Completed in 1.906s at Sat May 18 2013 12:48:24 GMT+0530 (IST) - Waiting...
    OK
    >> File ".tmp/styles/main.css" changed.

    Running "watch" task
    ... Reload .tmp/styles/main.css ...
    Completed in 0.002s at Sat May 18 2013 12:48:24 GMT+0530 (IST) - Waiting...

//------------------------------------- my.sass
对 my.sass 的更改
重新加载不行(不重新加载)
grunt 服务器窗口抓取 =

    Running "watch" task
    Waiting...OK
    >> File "app/styles/my.sass" changed.

    Running "compass:server" (compass) task
    unchanged app/styles/main.scss
    unchanged .tmp/images/generated/design-s65ab268e46.png
    overwrite .tmp/styles/my.css 

    Running "watch" task
    Completed in 0.602s at Sat May 18 2013 13:00:19 GMT+0530 (IST) - Waiting...

//--------------------------------------
my.sass 更改后
对 index.html 或 main.scss 所做的更改未显示在 grunt 服务器窗口中

Watch 命令不记录任何内容。
更改 r 未重新加载
//------------------------------------------------
重新启动 Grunt 服务器
//------------------------------------------------- hello.coffee

grunt 服务器窗口抓取=

    OK
    >> File "app/scripts/hello.coffee" changed.

    Running "coffee:dist" (coffee) task
    File .tmp/scripts/hello.js created.

    Running "watch" task
    Completed in 0.011s at Sat May 18 2013 13:34:56 GMT+0530 (IST) - Waiting...

//------------------------------------------------

最佳答案

当前的 livereload/yo 设置存在错误。以下是详细信息以及有问题的依赖项的修复(connect-livereload)。

https://github.com/yeoman/generator-webapp/issues/63

关于yeoman - 升级 yo grunt-cli Bower 后实时重新加载不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16567460/

相关文章:

angularjs - 警告: Cannot read property 'main' of undefined Use

node.js - 如何让 grunt.js 启动 express 应用程序进行测试

javascript - 为什么 Yeoman 不能在 exec 方法后执行异步回调?

javascript - 在 Ionic-Angular 上, bower 组件已被忽略

angularjs - Yeoman Angular 生成器不适用于基础

javascript - Yeoman Web 应用程序生成器 LiveReload 片段不工作

gruntjs - yeoman grunt-wiredep 不注入(inject)依赖项

javascript - 无法让我的 JavaScript babel 工作

javascript - 如何使用 Yeoman 缩小 Bower 组件?

angularjs - 如何在我的项目中使用 Bower 包组件