dylang / grunt-notify

Automatic Notifications when Grunt tasks fail.
https://npmjs.org/package/grunt-notify
MIT License
921 stars 73 forks source link

No notifications appear #79

Closed MarcelRobitaille closed 9 years ago

MarcelRobitaille commented 10 years ago

I am not getting any notifications at all. grunt -v showed no errors but grunt --debug didn't even show grunt-notify anywhere. Here is my package.json:

{ "name": "grunt_test_world", "version": "0.1.0", "devDependencies": { "grunt": "~0.4.5", "grunt-clear": "^0.2.1", "grunt-contrib-htmlmin": "^0.3.0", "grunt-contrib-imagemin": "^0.8.0", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-nodeunit": "~0.4.1", "grunt-contrib-uglify": "~0.5.0", "grunt-contrib-watch": "^0.6.1", "grunt-newer": "^0.7.0", "grunt-notify": "^0.3.1", "grunt-svgstore": "^0.3.3" } }

dylang commented 10 years ago

I don't see grunt-notify in your package.json.

MarcelRobitaille commented 10 years ago

Now I just feel stupid. I swore I saw it earlier. Maybe just glanced at nodeunit and uglify. and they merged into notify in my head.

alexandertrefz commented 10 years ago

I do, second to last row: "grunt-notify": "^0.3.1",

I also have the same/a similar Problem on OSX 10.9.4 with a very simple project. No notifications appear at all.

grunt -v shows that grunt-notify gets loaded just fine. No grunt-notify in grunt --debug however.

When I call the .app manually it gives me a notification.

My package.json:

{
  "name": "x",
  "readme": "README.md",
  "version": "0.0.1",
  "dependencies": {
    "grunt": "^0.4.5",
    "grunt-contrib-copy": "^0.5.0",
    "grunt-contrib-sass": "^0.8.1",
    "grunt-contrib-watch": "^0.6.1",
    "grunt-notify": "^0.3.1",
    "grunt-ts": "^1.11.7"
  }
}
dylang commented 10 years ago

@atrefz What notifications are you expecting to see from grunt-notify? Can you share your gruntfile?

alexandertrefz commented 10 years ago

I can share the gruntfile tomorrow, it is at work I dont have access to it here. As to what I expect: I compile files with grunt-ts, so i really would like to see if either the task is finished successfully or if the compile process threw an error.

The gruntfile is really simple, it is just a normal compile task, and grunt.loadNpmTasks('grunt-notify'); thrown in.

alexandertrefz commented 10 years ago

@dylang Here is the Gruntfile:

module.exports = function (grunt) {

    grunt.initConfig({
        ts: {
            buildLibs: {
                src: ["web/src/ts/libs/**/*.ts"],
                out: "web/assets/js/libs.js",
                options: {
                    allowBool: true,
                    target: "es5",
                    sourceMap: true,
                    declaration: "typings/libs/libs.d.ts",
                    removeComments: true
                }
            },

            buildApp: {
                src: ["web/src/ts/app/**/*.ts"],
                out: "web/assets/js/app.js",
                options: {
                    allowBool: true,
                    target: "es5",
                    sourceMap: true,
                    declaration: "typings/app/app.d.ts",
                    removeComments: true
                }
            }
        },

        copy: {
            libsDef: {
                src: "web/assets/js/libs.d.ts",
                dest: "typings/libs/libs.d.ts"
            }
        },

        watch: {
            options: {
                atBegin: true
            },

            libs: {
                files: ["web/src/ts/libs/**/*.ts"],
                tasks: ["ts:buildLibs", "copy:libsDef"],
                options: {
                    spawn: false
                }
            },

            app: {
                files: ["web/src/ts/app/**/*.ts"],
                tasks: ["ts:buildApp"],
                options: {
                    spawn: false
                }
            }
        }
    });

    grunt.loadNpmTasks("grunt-ts");
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-notify');

    grunt.registerTask("default", ["ts:buildLibs", "ts:buildApp", "copy:libsDef"]);

};

Like i said, if a notification after ts:buildLibs would come and tell me that buildLibs has been successful, or not successful I would be happy :)

alexandertrefz commented 10 years ago

@dylang actually, this seems to be a misunderstanding on my part - I get notifications, if tasks fail, but not if they succeed. Maybe that should be made clearer in the README.md. Also, maybe that should be a default - since people use grunt mostly for compiling tasks, getting a notification that the compile is done, is usually wanted, IMHO.