Giter VIP home page Giter VIP logo

Comments (10)

wfpaisa avatar wfpaisa commented on July 20, 2024 1

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.

austinmao avatar austinmao commented on July 20, 2024

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.

Karnith avatar Karnith commented on July 20, 2024

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.

austinmao avatar austinmao commented on July 20, 2024

I still got the same error with this change

from machinepack-sailsgulpify.

Karnith avatar Karnith commented on July 20, 2024

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.

davidsoderberg avatar davidsoderberg commented on July 20, 2024

I got exact same issue on my computer.

from machinepack-sailsgulpify.

Karnith avatar Karnith commented on July 20, 2024

what version of sails are you guys using? could you post your gulp dependencies and anything else that might help.

from machinepack-sailsgulpify.

davidsoderberg avatar davidsoderberg commented on July 20, 2024

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.

wfpaisa avatar wfpaisa commented on July 20, 2024

hello, I have the same problem, any solution?

from machinepack-sailsgulpify.

Karnith avatar Karnith commented on July 20, 2024

auto reload should e fixed now. will push to npm shortly.

from machinepack-sailsgulpify.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.