Comments (10)
this my solution:
/**
* Run predefined tasks whenever watched file patterns are added, changed or deleted.
*
* ---------------------------------------------------------------
*
* Watch for changes on
* - files in the `assets` folder
* - the `tasks/pipeline.js` file
* and re-run the appropriate tasks.
*
*
*/
module.exports = function(gulp, plugins, growl) {
var server = plugins.livereload;
server.listen();
gulp.task('watch:api', function() {
// Watch Style files
return gulp.watch('api/**/*', ['syncAssets'])
.on('change', function(file) {
server.changed(file.path);
});
});
gulp.task('watch:assets', function() {
// Watch assets
return gulp.watch(['assets/**/*', 'tasks/pipeline.js'], ['syncAssets'])
.on('change', function(file) {
server.changed(file.path);
});
});
};
var server = plugins.livereload();
-> var server = plugins.livereload;
add: server.listen();
from machinepack-sailsgulpify.
If this helps, here is my packages.json for gulp dependencies:
"gulp": "^3.9.0",
"gulp-autoprefixer": "^3.1.0",
"gulp-cache": "^0.3.0",
"gulp-changed": "^1.3.0",
"gulp-coffee": "^2.3.1",
"gulp-concat": "^2.6.0",
"gulp-if": "^2.0.0",
"gulp-imagemin": "^2.4.0",
"gulp-jade": "^1.1.0",
"gulp-jshint": "^1.12.0",
"gulp-less": "^3.0.3",
"gulp-linker": "^0.1.7",
"gulp-livereload": "^3.8.1",
"gulp-load-plugins": "^1.0.0",
"gulp-minify-css": "^1.2.1",
"gulp-notify": "^2.2.0",
"gulp-rename": "^1.2.2",
"gulp-rimraf": "^0.2.0",
"gulp-sass": "^2.1.0",
"gulp-template-compile": "^1.1.0",
"gulp-uglify": "^1.4.2",
"gulp-util": "^3.0.7",
from machinepack-sailsgulpify.
yeah, live reload decided to completely change their api....
Try this as a workaround until I update the module
watch.js
/**
* Run predefined tasks whenever watched file patterns are added, changed or deleted.
*
* ---------------------------------------------------------------
*
* Watch for changes on
* - files in the `assets` folder
* - the `tasks/pipeline.js` file
* and re-run the appropriate tasks.
*
*
*/
module.exports = function(gulp, plugins, growl) {
//var server = plugins.livereload();
gulp.task('watch:api', function() {
// Watch Style files
var server = plugins.livereload();
return gulp.watch('api/**/*', ['syncAssets']);
//.on('change', function(file) {
// server.changed(file.path);
//});
});
gulp.task('watch:assets', function() {
// Watch assets
var server = plugins.livereload();
return gulp.watch(['assets/**/*', 'tasks/pipeline.js'], ['syncAssets']);
//.on('change', function(file) {
// server.changed(file.path);
//});
});
};
Let me know how you get on...
from machinepack-sailsgulpify.
I still got the same error with this change
from machinepack-sailsgulpify.
I'll look at it today and make the changes needed. I have it working on my system.
JCMAR
Matthew Marino
[email protected]
P: +1 (206) 612-1725
-------- Original message --------
From: Austin Mao [email protected]
Date: 11/02/2015 14:26 (GMT-08:00)
To: Karnith/machinepack-sailsgulpify [email protected]
Cc: Matthew Marino [email protected]
Subject: Re: [machinepack-sailsgulpify] Livereload causes crash on any change (#5)
I still got the same error with this change
Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-153177530.
from machinepack-sailsgulpify.
I got exact same issue on my computer.
from machinepack-sailsgulpify.
what version of sails are you guys using? could you post your gulp dependencies and anything else that might help.
from machinepack-sailsgulpify.
this is my dependencies:
"bootstrap-sass": "^3.3.6",
"ejs": "2.3.4",
"gulp": "^3.9.1",
"gulp-autoprefixer": "^3.1.0",
"gulp-cache": "^0.4.2",
"gulp-changed": "^1.3.0",
"gulp-concat": "^2.6.0",
"gulp-if": "^2.0.0",
"gulp-imagemin": "^2.4.0",
"gulp-jshint": "^2.0.0",
"gulp-linker": "^0.1.7",
"gulp-livereload": "^3.8.1",
"gulp-load-plugins": "^1.2.0",
"gulp-minify-css": "^1.2.3",
"gulp-notify": "^2.2.0",
"gulp-rename": "^1.2.2",
"gulp-rimraf": "^0.2.0",
"gulp-sass": "^2.2.0",
"gulp-template-compile": "^1.1.0",
"gulp-uglify": "^1.5.2",
"gulp-util": "^3.0.7",
"include-all": "~0.1.6",
"istanbul": "^0.4.2",
"jshint": "^2.9.1",
"machinepack-prompts": "^0.5.0",
"machinepack-sailsgulpify": "^1.0.1",
"mocha": "^2.4.5",
"rc": "1.0.1",
"rimraf": "^2.5.2",
"run-sequence": "^1.1.5",
"sails": "~0.12.1",
"sails-disk": "~0.10.9",
"sails-hook-autoreload": "^0.13.1",
"sails-mysql": "^0.11.4"
from machinepack-sailsgulpify.
hello, I have the same problem, any solution?
from machinepack-sailsgulpify.
auto reload should e fixed now. will push to npm shortly.
from machinepack-sailsgulpify.
Related Issues (10)
- Documentation clarity HOT 2
- refactor machinepack for updating sails HOT 1
- change since 0.12.3 HOT 1
- custom tasks deleted HOT 1
- This machinepack does not remove the need for grunt entirely. HOT 4
- [Feature request] A way to modify `sails new` behaviour
- How to install HOT 10
- Sass task HOT 2
- Error: server.changed is not a function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from machinepack-sailsgulpify.