sails.js的livereload减少,发出咕unt声,无法正常工作 [英] sails.js less livereload with grunt watch not working

查看:114
本文介绍了sails.js的livereload减少,发出咕unt声,无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用grunt完美地在CSS中编译了较少的文件,并且在 .tmp/public/styles
中看到了结果 因此,现在应该在帆生成的项目中自然生成带有 grunt-contrib-watch liver 了吗?
还是我必须进行特殊配置?

I got my less files compiled in css perfectly by grunt and I see result in .tmp/public/styles
So now livereload with grunt-contrib-watch should be made naturally in sails generated project ?
Or do I have to make a special configuration ?

我在 tasks/pipeline.js 文件中发现了这一点,但不确定该怎么做.

I found that in tasks/pipeline.js file but not sure of what to do.

// CSS files to inject in order
//
// (if you're using LESS with the built-in default config, you'll want
//  to change `assets/styles/importer.less` instead.)
var cssFilesToInject = [
  'styles/**/*.css'
];

我在文件 tasks/README.md 中看到了:

###### `sails lift`

Runs the `default` task (`tasks/register/default.js`).

在文件 default.js 中,我们得到了:

And in the file default.js we got :

module.exports = function (grunt) {
    grunt.registerTask('default', ['compileAssets', 'linkAssets',  'watch']);
};

但是文件夹中缺少 watch.js 文件...
应该是什么?

But watch.js file is missing in the folder...
What should it be ?

推荐答案

Watch只会查找已更改且执行较少的文件(sass,注入等),但不会重新加载.

Watch does only looking for files that have changed and execute less, sass, injection and so on - but it doesn't make a reload.

您可以在task/config/watch.js

这篇关于sails.js的livereload减少,发出咕unt声,无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆