Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watch reports directories as being added that were not #8

Closed
pghalliday opened this issue Oct 18, 2012 · 2 comments
Closed

Watch reports directories as being added that were not #8

pghalliday opened this issue Oct 18, 2012 · 2 comments
Labels
Milestone

Comments

@pghalliday
Copy link

Just put this in a comment on another issue but actually figured it should have it's own issue.

On a 64bit Ubuntu VM when i only save grunt.js I get the following output:

Waiting...OK
>> File "src" added.
>> File "grunt.js" changed.
Running "lint:node" (lint) task
Lint free.

Running "lint:nodeTest" (lint) task
Lint free.

Running "mochaTest:test" (mochaTest) task
 42  -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_,------,
 0   -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_|   /\_/\ 
 0   -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-^|__( ^ .^) 
     -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-  ""  "" 

  ✔ 42 tests complete (846 ms)


Done, without errors.

Waiting...

Note that the src directory already existed and was not added. Here is my grunt file:

module.exports = function(grunt) {

  grunt.loadNpmTasks('grunt-mocha-test');
  grunt.loadNpmTasks('grunt-contrib-watch');

  function getLintConfig() {
    return {
      options: {
        curly: true,
        eqeqeq: true,
        immed: true,
        latedef: true,
        newcap: true,
        noarg: true,
        sub: true,
        undef: true,
        boss: true,
        eqnull: true,
        es5: true,
        strict: false
      },
      globals: {
      }
    };
  }

  function getNodeLintConfig() {
    var config = getLintConfig();
    config.options.node = true;
    return config;
  }

  function getNodeTestLintConfig() {
    var config = getNodeLintConfig();
    config.globals.describe = false;
    config.globals.it = false;
    config.globals.before = false;
    config.globals.after = false;
    return config;
  }

  // Project configuration.
  grunt.initConfig({
    lint: {
      node: ['grunt.js', 'src/**/*.js'],
      nodeTest: ['test/src/**/*.js', 'test/integration/**/*.js']
    },
    jshint: {
      node: getNodeLintConfig(),
      nodeTest: getNodeTestLintConfig()
    },
    mochaTest: {
      test: ['test/src/**/*.js', 'test/integration/**/*.js'],
      doc: ['test/src/**/*.js']
    },
    mochaTestConfig: {
      test: {
        options: {
          reporter: 'nyan'        
        }
      },
      doc: {
        options: {
          reporter: 'doc'        
        }
      }
    },
    watch: {
      files: ['grunt.js', 'src/**/*.js', 'test/src/**/*.js', 'test/integration/**/*.js'],
      tasks: ['default']
    }
  });

  // Default task.
  grunt.registerTask('default', 'lint mochaTest:test');

  // Documentation task.
  grunt.registerTask('doc', 'mochaTest:doc');
};
@shama
Copy link
Member

shama commented Oct 22, 2012

FYI, I've got some fixes for this coming down the pipeline.

@shama
Copy link
Member

shama commented Oct 28, 2012

This should be fixed in v0.1.3 now that it uses gaze v0.2.0: e5750ed. Please reopen if it still an issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants