ehynds / grunt-remove-logging

Grunt.js task for removing console logging statements
MIT License
192 stars 33 forks source link

Remove from multiple files ? #12

Closed andyscott12 closed 10 years ago

andyscott12 commented 11 years ago

Hi Guys,

Bit confused how to run this out for a whole directory of files ?

removelogging: {
    dist: {
      src: './build/**/*.js',
      dest: './build/**/*.js',
      options: {
        // see below for options. this is optional.
      }
    }
}

tried that but it didnt work ? How can I basically take all files in 1 directory, remove logging and then just overwrite the file again in that dir ?

charliedowler commented 11 years ago

I'm looking for a solution to this as well, can't seem to find a way.

shakyShane commented 11 years ago

Pull request submitted that provides exactly this functionality.

https://github.com/ehynds/grunt-remove-logging/pull/13

charliedowler commented 11 years ago

cheers :)

alekseychikin commented 10 years ago

@ehynds, can you confirm that pull request, update version and upload to npmjs.com? It would be very useful.

ehynds commented 10 years ago

13 is merged.

shakyShane commented 10 years ago

:+1:

alekseychikin commented 10 years ago

And it doesn't work =) I try:

removelogging: {
  main: {
    src: 'js/*.js'
  }
},

and get back:

Warning: Unable to write "undefined" file (Error code: undefined). Use --force to continue.

And this warning i've got everytime. Also, at http://npmjs.org/package/grunt-remove-logging i see version 2.0, but at package.json is 0.1.1.

ehynds commented 10 years ago

Use src: ['js/*.js'] instead, and I see 0.2.0 in the package.json file?

alekseychikin commented 10 years ago

I installed it by

npm install grunt-remove-logging

And at node_modules/grunt-remove-loggin/package.json have:

...
  "name": "grunt-remove-logging",
  "description": "Grunt task to remove console logging statements",
  "version": "0.1.1",
  "homepage": "",
...

Maybe you forgot update at npm?

ehynds commented 10 years ago

0.2.0 is published on npm. try clearing your npm cache: npm cache clean

alekseychikin commented 10 years ago

Thanks! Sorry, my mistake.