当我对项目根目录中的 index.html 进行更改时,我正在尝试更新我的浏览器。更新 CSS 时 Livereloading 工作正常。我已经在下面的 gulpfile.js 中删除了我为使其工作所做的努力......
谢谢!
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),
concat = require('gulp-concat'),
notify = require('gulp-notify'),
cache = require('gulp-cache'),
livereload = require('gulp-livereload'),
lr = require('tiny-lr'),
server = lr();
gulp.task('styles', function() {
return gulp.src('components/sass/style.scss')
.pipe(sass({ style: 'expanded' }))
.pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4')) …Run Code Online (Sandbox Code Playgroud) 我最近安装了 Sublime Text 3 的 LiveReload插件。我还安装了 LiveReload Chrome 扩展。一切都很好,但还有一个令人头痛的问题。我需要进入 Sublime 中的包控制,并在每次打开 Sublime 时启用 LiveReload Simple Reload 插件。有没有办法永久启用 Sublime Text 3 LiveReload 插件?
我有以下设置:rails 4. 所有 SCSS 和 HTML 都在 app/assets/stylesheets | templates
宝石档案:
gem 'guard'
gem 'guard-compass'
gem 'guard-shell'
gem 'guard-livereload'
Run Code Online (Sandbox Code Playgroud)
保护文件:
guard :livereload do
watch(%r{app/assets/.+\.(css|html|png|jpg)})
end
Run Code Online (Sandbox Code Playgroud)
Liverload 已连接并等待更改
$ guard
19:45:10 - INFO - LiveReload is waiting for a browser to connect.
19:45:11 - INFO - Guard is now watching at '/Users/dev/myproject'
[1] guard(main)> 19:46:05 - INFO - Browser connected.
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用npm来构建我的项目(所以我不想使用gulp或grunt).
我想在每次项目文件发生变化时重新加载页面,但我无法弄清楚如何做到这一点.有人可以帮助我,我需要如何使用例如livereload这个例子?:
"scripts": {
"build": "browserify js/index.js > build/index.js -vd",
"start": "watchify js/index.js -o build/index.js -vd & serve . -p 3001 & opener http://localhost:3000"
}
Run Code Online (Sandbox Code Playgroud)
谢谢!乐华
我一直在为我的 ng2 项目使用 AngularCLI,并且在过去几个月中它一直很棒。最近几周,它似乎变得越来越慢。
如果我进行简单的 HTML 更改,现在需要 1 到 2 分钟才能使用“ng serve”运行并刷新浏览器。发生这种情况时,NodeJS 会消耗大量 RAM 和 CPU。
我在我旁边的一台新笔记本电脑上运行了相同的代码和进程,大约需要 20 秒。我目前在 Windows Home 10 上使用 CLI 1.0.0-beta.21。我有 8 个演出内存/SSD/i7。
我试过了:
一切都无济于事。
这是输出:
webpack: bundle is now INVALID.
6938ms building modules
72ms sealing
4ms optimizing
1ms basic module optimization
1074ms module optimization
5ms advanced module optimization
149ms basic chunk optimization
1ms chunk optimization
1ms advanced chunk optimization
702ms module and chunk tree optimization …Run Code Online (Sandbox Code Playgroud) 我在开始反应时经常使用 CRA 或 (create-react-app)。CSS 更改的热重新加载工作并且很棒。而热重载 JSX 和类函数不起作用 - 如果我更改 JSX 或某些事件处理程序 - 页面会重新加载。
一些线程指出,如果我取消注释这一行
//require.resolve('webpack/hot/dev-server'),
Run Code Online (Sandbox Code Playgroud)
在webpack.config.dev.js那么它会工作-但它仍然无法正常工作
这个 webpack 标志也不适用于package.json npm start script:
"start": "webpack-dev-server --progress --colors --hot --config webpack.config.js"
Run Code Online (Sandbox Code Playgroud)
--hot 不起作用。
现在我正在学习 Redux - 它的功能之一是热重载 - 所以如果我只学习 Redux - 我是否能够做到 - 或者这是一些配置更改还是我必须安装一些额外的 NPM 包?请指导。
我正在尝试使用 LiveReload 在 Android 设备上运行我的应用程序。使用“ionic run android”命令,一切正常,但是当我尝试执行“ionic run android -l”以使用livereload时,在SplashScreen之后出现此错误:
?连接服务器不成功(http://192.168.56.1:8100/)
我正在使用 Windows,并且创建了一个入站规则以允许 Windows 防火墙上的 8100 和 35729 端口,但仍然无法正常工作。
Cordova 白名单插件也在 config.xml 中安装和配置:
<content src="index.html"/>
<access origin="*"/>
<allow-navigation href="http://ionic.local/*"/>
<allow-navigation href="*"/>
<allow-navigation href="http://192.168.56.1:8100"/>
<allow-intent href="http://*/*"/>
<allow-intent href="https://*/*"/>
我正在使用 USB 电缆运行到设备。
版本:
我已经尝试添加
<preference name="loadUrlTimeoutValue" value="700000" />?
但在这种情况下,我收到超时错误。你可以帮帮我吗?
我正在开发一个由 PHP 后端提供服务的 ReactJS-App。在我的本地机器上,我用一个指向我项目根目录的虚拟主机设置了 MAMP,我使用 webpack 来捆绑我的 React-App。
因为我真的很喜欢使用热重载,所以我现在尝试使用 webpack 开发服务器来代理 MAMP 并从其反应热加载功能中受益。
我还没有能够让它工作,我希望有人帮助我进行配置。或者我的方法基本上不起作用?不管怎样,如果你能帮我解决这个问题,我会很高兴的。提前致谢!到目前为止,这是我的 webpack 配置:
const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const StyleLintPlugin = require('stylelint-webpack-plugin');
module.exports = {
devtool: 'cheap-module-source-map',
devServer: {
port: 3000,
proxy: {
'*': {
target: 'http://my-virtual-host.dev:8888/',
}
}
},
entry: [
'./src/app.jsx'
],
output: {
path: path.join(__dirname, 'build'),
filename: 'bundle.js',
publicPath: 'http://localhost:3000/build/'
},
resolve: {
extensions: ['.js', '.jsx']
},
module: {
loaders: [
{
enforce: 'pre',
test: /\.jsx?$/,
include: …Run Code Online (Sandbox Code Playgroud) 当我更改 /templates 中的 thymeleaf .html 文件时,我希望浏览器自动重新加载页面。我安装了实时重新加载插件,它能够与 Spring Boot 服务器握手。但是,在更改 thymeleaf 模板文件时,我必须手动重新加载浏览器。任何我可能缺少的建议。显然我已经spring-boot-devtools启用并手动更新了属性devtools.livereload.enabled = true。并且 spring devtools 正确地反映了对构建目标中任何模板或控制器的更改,并且通过手动重新加载浏览器,我看到了更改。
根据 spring 文档。
某些资源在更改时不一定需要触发重新启动。例如,可以就地编辑 Thymeleaf 模板。默认情况下,更改 /META-INF/maven、/META-INF/resources、/resources、/static、/public 或 /templates 中的资源不会触发重新启动,但会触发实时重新加载。
我让我的本地运行在损坏的 https 上。(某些证书问题,这会导致not securechrome 地址栏中出现一条消息。这可能是实时重新加载不起作用的原因。
spring thymeleaf livereload spring-boot-devtools spring-boot-2
livereload ×10
reactjs ×2
android ×1
angular-cli ×1
browserify ×1
github-pages ×1
gulp ×1
ionic2 ×1
javascript ×1
mamp ×1
node.js ×1
npm ×1
plugins ×1
proxy ×1
redux ×1
sass ×1
spring ×1
sublimetext3 ×1
svelte ×1
thymeleaf ×1
webpack ×1