Grunt.js: Fire livereload as soon a files are modified, before task completes

Grunt.js: Fire livereload as soon a files are modified, before task completes

Content Index :

Grunt.js: Fire livereload as soon a files are modified, before task completes
Tag : node.js , By : orlandoferrer
Date : November 25 2020, 07:27 PM

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Grunt: `contrib-watch` Fire livereload event after `grunt-nodemon` has restarted when server-side `.coffee` files are co

Tag : development , By : lamberms
Date : March 29 2020, 07:55 AM
should help you out I've not used this myself but I came across it a while ago: grunt-rerun. Used in combination with a watch task you can pause a long running task such as express (but probably would work with nodemon as well), run some tasks, then start the task again. The sample config looks like so:
  watch: {
      dev: {
        files: ['server/*.js'],

        //Note the :go flag used for sending the reload message to the rerun server
        tasks: ['clean','rerun:dev:express:go']
    express: {
        dev: {
            options: {
                port: 3000,
                bases: ['/public'],
                keepalive: true,
                server: path.resolve('./server/app.js')
    // Configuration to be run (and then tested).
    rerun: {
      dev: {
        options: {
          tasks: ['express']

How to print out a text once grunt task completes?

Tag : javascript , By : beng
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , There is a much better way to do it, without creating an extra task, and modifying anything else.
Grunt is a node process, so you can:
module.exports = function (grunt) {
    // Creates a write function bound to process.stdout:
    var write = process.stdout.write.bind(process.stdout);

    // Subscribes to the process exit event...
    process.on("exit", function () {
        // ... to write the information in the process stdout
        write('\nFinished at ' + new Date().toLocaleTimeString()+ '\n');

    // From here, your usual gruntfile configuration, without changes

grunt-contrib-watch livereload 35729 livereload.js fails to load

Tag : javascript , By : James B
Date : March 29 2020, 07:55 AM
wish help you to fix your issue You try to run nodemon and watch tasks twice. First, when you run concurrent task and second when you call themselves.
Change your concurrent task config to
concurrent: {
    tasks: ['nodemon', 'watch'],
    options: {
        logConcurrentOutput: true
grunt.registerTask('dev', ['env:dev', 'concurrent', 'jshint', 'nodeunit', 'sass']);

grunt livereload globally for all files

Tag : javascript , By : Kuer
Date : March 29 2020, 07:55 AM
This might help you
livereload: {
    files: ['**/*'],
    options: {
        livereload: true

Grunt - Queueing a task to run after a previous task completes

Tag : javascript , By : user185144
Date : March 29 2020, 07:55 AM
it should still fix some issue first, best practice is to use npm package to load all tasks automatically:
// Load grunt tasks automatically
one: {
      wake up...

two: {
      dress up...
grunt.registerTask('oneThenOther', [
Related Posts Related QUESTIONS :
  • i can't receive any answer from Watson Discovery
  • How to get hash value from image using ImageMagick or GraphicsMagick Node.js?
  • How to require dotenv/config file on (before) PM2 starts
  • Node JS Async/Await
  • How to concat chunks of incoming binary into video (webm) file node js?
  • GitLab CI with Postgres ERROR: connect ECONNREFUSED
  • Is it possible to show live data from MongoDB via socket.io?
  • Uploading HDR photo from iPhone to web - GPS data missing
  • Can I run multiple node version on Jenkins?
  • How to set default boolean value in sequelize
  • Cannot read property 'db' of null javascript with parcel
  • using async function into loop with nodejs?
  • How to use keycloak with NestJS properly
  • Changing the title of the header
  • How can i make an horizontal carousel in dialogflow?
  • how to fix the problem when i run any command regarding to npm it shows error
  • node.js - how to check/get ssl certificate expiry date
  • How to show base64 image in react?
  • Error while pushing to Heroku: Cannot find module 'node-linux-x64/package.json'
  • Adding title element to paperjs SVG (using node.js)
  • Wait for firestore queries to finish before return a cloud function response
  • How to upload files larger than 10mb via google cloud http functions. ? Any alternative options?
  • How to use the NODE_OPTIONS environment variable to set the max_old_space_size globally in Windows?
  • Is nodejs representing Reactor or Proactor design pattern?
  • How to reference generated Prisma schema in my schema.graphql file for a query that filters by id
  • Cant figure out what is wrong with my models
  • npm ERR! EPROTO: protocol error, symlink '../@babel/parser/bin/babel-parser.js' -> '/home/vagrant/code/proadco.test/n
  • express-session - the difference between session id and connect.sid?
  • How do you run this list of command that come from a book Eloquent Javascript Node.js
  • how to convert from import to require in nodejs
  • POST request returns undefined
  • How to read large json file in node js?
  • AWS Lambda function written in nodejs is not updating my DynamoDB
  • Best way to define a Map Object in GraphQL Schema?
  • bigchaindb-driver not found in node_modules?
  • Upgrading yarn in root directory do not upgrade Workspace dependencies
  • How can I redirect all clients to another page with socket.io?
  • How is `cluster` and `worker_threads` work in Node.js?
  • AWS Lambda - Not able to a access JS file bundled in Layer (Node.js)
  • How to connect AWS Bitnami Certified Kafka AMI with Elastic Beanstalk nodejs environment using kafka-node
  • Define Shortcut Keys by user (add or edit by user in web app)?
  • 'this' in regular function vs fat arrow function in ES6, illustrated with an example of Mongoose
  • Could not find the implementation for builder @angular-devkit/build-angular:dev-server on ng serve command
  • The engine "node" is incompatible with this module
  • fs.readDirSync can't find dir in typescript?
  • Difference between keepAliveTimeout and timeout?
  • Visual Studio Code: "'tslib' cannot be found" error in Angular project
  • Embedding twitter timeline does not render in angular 7
  • Secret environment variables in Cloudbuild (with out files), how?
  • more than one 2dsphere index, not sure which to run geoNear
  • Why only 50 instances working on AWS lambda?
  • VSCode debugging (F5) react app gives SyntaxError: Unexpected identifier
  • How to use sweetalert in nodejs?
  • ng update --all does say 'Repository is not clean' evendought git commit
  • I want to update user profile
  • Uncaught ReferenceError: __webpack_dev_server_client__ is not defined
  • Webpack not being recognized after updates
  • use firebase Storage with Admin sdk node.js
  • If I want my graphql endpoint to be something other than `/graphql`, how do I configure it with the `GraphqlModule`?
  • Node.js JWT token
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com