标签: livereload

Yeoman:在更改SCSS文件时触发LiveReload

我已经得到了最新的自耕农堆栈,我刚刚升级发电机的webapp掌握按:https://github.com/yeoman/generator-webapp/pull/67获得livereload正常工作.

HTML文件和css文件似乎正常使用livereload,但scss文件不会触发重新加载.这是一个输出片段:

OK
>> File "app/index.html" changed.


Running "watch" task
... Reload app/index.html ...
... Reload app/index.html ...
Completed in 0.005s at Wed Jun 05 2013 22:45:46 GMT+0100 (BST) - Waiting...
OK
>> File "app/styles/main.scss" changed.


Running "compass:server" (compass) task
overwrite .tmp/styles/main.css 

Running "watch" task
Completed in 1.101s at Wed Jun 05 2013 22:45:57 GMT+0100 (BST) - Waiting...
Run Code Online (Sandbox Code Playgroud)

正在监视和编译scss文件,但看起来好像忽略了.tmp中输出的css.尽管在(默认)Gruntfile中有以下内容.

        livereload: {
            options: {
                livereload: LIVERELOAD_PORT
            },
            files: [
                '<%= yeoman.app %>/*.html',
                '{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css',
                '{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js',
                '<%= …
Run Code Online (Sandbox Code Playgroud)

sass yeoman livereload compass-sass

5
推荐指数
1
解决办法
2027
查看次数

使用Watchify集成gulp-livereload

我正在使用Substack的Watchify在Gulp监视任务中获得更好的Browserify构建,如下所示:

var gulp = require('gulp');
var source = require('vinyl-source-stream');
var watchify = require('watchify');

var hbsfy = require("hbsfy").configure({
  extensions: ["html"]
});

gulp.task('watch', function() {
    var bundler = watchify('./public/js/app.js');

    bundler.transform(hbsfy);

    bundler.on('update', rebundle);

    function rebundle() {
        return bundler.bundle()
            .pipe(source('bundle.js'))
            .pipe(gulp.dest('./public/dist/js/'));
    }

    return rebundle();
});
Run Code Online (Sandbox Code Playgroud)

试图找出如何将Live Reload合并到任务中,以便在Watchify完成它时触发它.知道怎么做吗?

node.js browserify livereload gulp

5
推荐指数
1
解决办法
3879
查看次数

用于PHP文件的Gulp LiveReload,不会刷新浏览器

为WordPress主题构建自己的gulpfile.js.目前所有的JS和CSS都运行得很好,而livereload正在重新加载css/js的变化.

但我还想在PHP文件发生变化时刷新浏览器.我做了一些搜索,发现以下剪切我在gulpfile.js中使用的

gulp.task('watch', function(){

    // Listen on port 35729 for LiveReload
    server.listen(35729, function (err) {if (err) {return console.log(err) };
        gulp.watch("assets/scss/**/*.scss", ['sass']);              // Watch and run sass on changes
        gulp.watch("assets/js/_*.js", ['javascripts']);             // Watch and run javascripts on changes
        gulp.watch("assets/img/*", ['imagemin', 'svgmin']);     // Watch and minify images on changes

        gulp.watch('**/*.php').on('change', function(file) {
            util.log('PHP FILES CHANGED!');
            server.changed(file.path);
        });

    });
});
Run Code Online (Sandbox Code Playgroud)

每当我更改PHP文件时,我都会看到"PHP文件已更改!" 在控制台中,但livereload不会更新浏览器.我错过了什么?

livereload gulp

5
推荐指数
2
解决办法
8450
查看次数

Jekyll自动加载浏览器页面

jekyll serve没有像grunt/gulp这样的其他工具可以运行像livereload(或browsersync)这样的系统?

我期待的是编辑css,sass,html或md文件并让浏览器页面自动重新加载.

我正在使用Jekyll 2.5.x.

jekyll livereload browser-sync

5
推荐指数
1
解决办法
764
查看次数

在chrome扩展中更改代码后,gulp刷新活动选项卡

我正在开发一个chrome扩展,我希望在代码更改后自动刷新活动选项卡

吞下开工作,所以我不需要导航到铬://扩展了与手动点击"刷新"

现在只剩下活动选项卡刷新

我已经尝试过gulp-livereload但是无法让它用于开发chrome扩展

任何想法如何处理这个?

build google-chrome-extension livereload gulp gulp-watch

5
推荐指数
1
解决办法
245
查看次数

如何通过单个NPM脚本获取node-sass监视和实时重新加载?

从以下脚本部分获取package.json:

"scripts":{
    "sass:watch": "npm run sass -- -w ./src/public/stylesheets -r --source-map true",
    "livereload": "live-reload --port 9091 ./src/**/*",
    "dev:watch" : "npm run sass:watch; npm run livereload"
}
Run Code Online (Sandbox Code Playgroud)

如何在不阻止对方的情况下成功运行任务sass:watch和任务?livereloaddev:watch

目前,当我运行块时.npm run dev:watch sass:watchlivereload

如果我重新排序它们,会出现同样的问题.

node.js npm livereload node-sass

5
推荐指数
3
解决办法
3884
查看次数

为什么LiveReload不能与Firefox一起使用以及如何解决它?

我有一个Livereload的问题,尤其是Firefox.当我在Firefox中安装附加组件时,浏览器中的图标未显示?

PS Firefox版本是43.0.4,Livereload - 2.1.1

firefox livereload

5
推荐指数
1
解决办法
3702
查看次数

开发时同步电子应用中的代码更改

当代码更改类似于web的浏览器同步时,是否有任何工具可以重新加载电子应用程序?

每当我们更改电子应用程序的代码时,我都会终止现有的运行过程并重新启动 电子. 它们是在代码更改时自动重新加载电子应用程序的工具.

javascript livereload nodemon electron

5
推荐指数
3
解决办法
5368
查看次数

Grunt在服务器上观看LiveReload

我正在服务器(非本地)上开发WordPress站点.每当我修改sass文件时,我想在浏览器中刷新页面.我已经列出了一些咕噜咕噜的任务,但是现在我只想让它在任何修改上刷新.现在,它会在文件被修改时捕获,但不会刷新页面.

Gruntfile:

module.exports = function(grunt) {

	// Project configuration.
	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),
		
		watch: {
			scripts: {
				options: { livereload: true },
				files: ['**/*.scss'],
				//tasks: ['criticalcss:front', 'criticalcss:page', 'cssmin', 'postcss'],
			}
		},
		
		 postcss: {
			options: {
				processors: [
					require('autoprefixer')({browsers: 'last 6 versions'}), // add vendor prefixes
					//require('cssnano')() // minify the result
				]
			},
			dist: {
				src: 'style.css',
				dest: 'style.css'
			}
		},
	
		criticalcss: {
			front : {
				options: {
					url: "https://grandeurflooring.ca/grand_dev/",
					minify: true,
					width: 1500,
					height: 900,
					outputfile: "critical_css/critical-front.css",
					filename: "style.css",
					buffer: 800*1024, …
Run Code Online (Sandbox Code Playgroud)

gruntjs livereload

5
推荐指数
1
解决办法
239
查看次数

SpringBoot livereload对OS X的静态源没有影响

我在Os X High Sierra上使用带有嵌入式Tomcat服务器和Intellij Idea 2018.2的Spring Boot 2.0.4.RELEASE。

正如教程所说

https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html

我在依赖项之后添加了pom.xml

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
    </dependency>
</dependencies>
Run Code Online (Sandbox Code Playgroud)

然后我看到

[restartMainMain] osbdaOptionalLiveReloadServer:LiveReload服务器在端口35729上运行

服务器启动时。

但是无论如何,静态源中的更改都无效,我必须按Cmd + F9才能在浏览器中看到它。

我尝试了IntelliJ 15的所有技巧,SpringBoot devtools livereload无法正常工作

例如启用“以编程方式构建项目”或“ compiler.automake.allow.when.app.running”,但没有任何帮助。

我的静态源(angularjs模板和文件)位于

src> main>资源>静态>模板

可能是静态位置错误?

任何想法表示赞赏!

java spring intellij-idea livereload spring-boot

5
推荐指数
1
解决办法
190
查看次数