Giter VIP home page Giter VIP logo

grunt-contrib-clean's People

Contributors

adjohnson916 avatar asapach avatar cowboy avatar ctalkington avatar dasa avatar dependabot[bot] avatar evictor avatar jkveganabroad avatar mojoaxel avatar nlfurniss avatar peternewman avatar pgilad avatar shama avatar sindresorhus avatar vladikoff avatar xhmikosr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grunt-contrib-clean's Issues

Doesn't remove .dot files

By default the grunt file glob ignores dot files, but grunt-contrib-clean uses a non-standard selector that doesn't supply a dot option like other tasks that use the more extensive file selector convention.

Maybe an option to override this would be in-order?

Cleaning external directory

I understand that by default users shouldn't be able to delete directories outside the current one, but there has to be a configuration value to override this. It is very annoying when I know what I am doing and I want to clean a folder outside my current one.

Tag releases and show some love for Bower.

Please tag your releases!

It's not friendly to use Bower and get, say, version 0.4.1 of this package because the only tag that has been created is 0.4.0!

I know it's possible to tell Bower to use the git url to a commit as a package version but hey, that's not very friendly, it's a last resort.

Accept objects as arrays

Having defined a hash with some target folders that other tasks use, it would be great if one could give that hash to the clean task, like this:

    var config = {
        build: {
            css: 'css/_build',
            js: 'js/_build',
            image: 'images/_build'
        }
    };

    clean: {
        all: {
            src: config.build
        }
    },

It seems that currently the src parameter doesn't accept hashes though. Can you make it do that?

Before and After Callbacks

I was looking for a way to display a specific message and potentially run a specific grunt task after one of my clean tasks completed.

I also thought it'll be handy to display a message before on some commands, this made me think it'll be useful to have the ability to add a before and after callback which takes an anonymous function.

Failing on Windows 8

Getting ENOTEMPTY when trying to clean a directory with various subdirectories and files on Windows 8, through Git bash.

git bash version:
1.8.1.msysgit.1

node v0.10.8 (The default install)
grunt v0.4.1 (Installed locally ran with global grunt-cli)
grunt-contrib-clean v0.4.1

dotfiles

hey, i am in the great situation that i have to work with a bleeding edge vsc, so called svn. if you dont know it, i am fine with it.. but svn creates in all subdirectories dotfiles which should not be deleted at all...

So. Is there a way to filter on a explicit pattern, to exlucde this from cleaning?

Not doing anything

I get the message:

Running "clean:out" (clean) task
Done, without errors.

But, it doesn't clean the specified folder.

    clean: 
        options:
            force: true
        out: ['/out/**/*.*']
        #out: ['/out']
        #out: ['/out/']
        #out: ['/out/*']
        #out: ['/out/**/*']

As you can see, I tried with some different options, but all of them does nothing.

How should I get this to work?

I have Win8, Nodejs 0.10.9, Grunt 0.4.1, Gunt-cli 0.1.9

Keep getting ENOTEMPTY error. Unable to delete directories.

I am having trouble deleting my dirs when running grunt-contrib-clean I get this output

Running "clean:dist" (clean) task
Verifying property clean.dist exists in config...OK
Files: .tmp, dist -> dist
Options: force, no-write=false
Cleaning .tmp...ERROR
Warning: Unable to delete ".tmp" file (ENOTEMPTY, directory not empty 'C:\Path\.tmp'). Use --force to continue.

Aborted due to warnings.

This is my grunt config:

clean: {
    options: { force: true },
    dist: ['.tmp', 'dist']
},

Is there anything that I can do to fix this issue?

System information

  • Windows 7
  • Node version: 0.10.17
  • Grunt version: 0.4.1
  • Task version: 0.5.0

Support `!` not selectors

Is there a way to use the ! selector in this task that I'm missing? I tried to use it in what I thought was a grunt standard way but it's not performing as I expected.

clean:
    unusedBowerComponents: [
        "<%= grunt.option('target') %>/bower_components/**"
        "!<%= grunt.option('target') %>/bower_components/**/require.js"
      ]

My goal is to be able to express ideas like "Hey man, clear out everything in that folder except *min.js."

I thought that'd be pretty nice. Instead, I have written this oversized monster :)

# Bower is a useful package manager, but fetches both build and dev code. We don't want to deploy that
   clean:
      unusedBowerComponents: [
        # File Types
        "<%= grunt.option('target') %>/bower_components/**/*.{html,jpg,png,md,doc,map,gemspec,lock,rb,ico,markdown,yml}"
        # Libraries (dev only)
        "<%= grunt.option('target') %>/bower_components/{bourbon,jasmine,jasmine-jquery}/"
        # Subfolders
        "<%= grunt.option('target') %>/bower_components/**/{src,docs,app,examples,samples,node_modules,test,tests,spec,features,site,demo}/"
        # Specific Files
        "<%= grunt.option('target') %>/bower_components/*/package.json"
        "<%= grunt.option('target') %>/bower_components/*/component.json"
        "<%= grunt.option('target') %>/bower_components/*/bower.json"
      ]

Clean operation failed

"devDependencies": {
"grunt": "~0.4.0",
"grunt-contrib-clean": "~0.4.0",
"grunt-contrib-concat": "~0.1.2",
"grunt-contrib-uglify": "~0.1.1",
"grunt-contrib-imagemin": "~0.1.1"
}

Warning: Clean operation failed. Use --force to continue.

Aborted due to warnings.


what's the meaning of warnings?

Improve README

The README is a little vague for noobs like me...
The only description of what this does is "Clean files and folders".
I don't know what that means.
How about a little extra description?
--thx ;)

Clean operation failed.

Whenever I try to use this plugin, I always get the above error.

All I am saying is:

clean: {
  build: ['temp/', 'public/']
}

I did npm install grunt-contrib-clean and I also loaded it in grunt. Those folders exist.

Cannot read property 'message' of undefined

Getting this message in 0.4.0.

Warning: Cannot read property 'message' of undefined Use --force to continue.

And gruntfile...

module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    jshint: {
      files: ['gruntfile.js', 'src/**/*.js'],
      options: {
        // options here to override JSHint defaults
        globals: {
          jQuery: true,
          console: true,
          module: true,
          document: true
        }
      }
    },
    concat: {
      options: {
        separator: ';'
      },
      build: {
        src: ['src/**/*.js'],
        dest: 'build/js/<%= pkg.name %>.js'
      }
    },
    uglify: {
      options: {
        banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
      },
      build: {
        files: {
          'build/js/<%= pkg.name %>.min.js': ['<%= concat.build.dest %>']
        }
      }
    },
    clean: {
      build: ['<%= concat.build.dest %>']
    }
  });

  // Load the plugin that provides the "uglify" task.
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-clean');

  // Default task(s).
  grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'clean']);
  grunt.registerTask('clean', ['clean']);

};

Negation not working?

The following deletes all files in the folder, including main.min.css - shouldn't that file have been negated and thus left behind?

clean: [
  "dist/css/**",
  "!dist/css/main.min.css"
]

clean not working for me

Just upgraded everything to grunt 0.4.0rc7 and installed grunt-contrib-clean. Here is my task def:

clean: {
test: ['assets/debug'],
//test2: {
// 'src': ['assets/debug']
//},
},

Tried all possible combinations (with/without leading and trailing slash, specifying 'src')...does not work. Keep getting:

Running "clean:test" (clean) task
Warning: Cannot read property 'src' of undefined Use --force to continue.

Aborted due to warnings.

Any ideas here? Thanks for any help...

Cannot delete files outside the current working directory.

grunt clean:development

Running "clean:development" (clean) task

Cleaning "../js"...Warning: Cannot delete files outside the current working directory. Use --
force to continue.

Is there a setting in the config to allow this or possible future feature?

bower submit

For this grunt-contrib project and all the other projects that are not present in the bower registry, was there a reason for this, or just not enough time for it ?

I have checked all other bower projects to see which one is present in bower regsitry, came up with the list bellow

OK - bower register "grunt-contrib-qunit" git://github.com/gruntjs/grunt-contrib-qunit.git
NO - bower register "grunt-contrib-connect" git://github.com/gruntjs/grunt-contrib-connect.git
NO - bower register "grunt-contrib-sass" git://github.com/gruntjs/grunt-contrib-sass.git
NO - bower register "grunt-contrib-jasmine" git://github.com/gruntjs/grunt-contrib-jasmine.git
NO - bower register "grunt-contrib-uglify" git://github.com/gruntjs/grunt-contrib-uglify.git
NO - bower register "grunt-contrib-csslint" git://github.com/gruntjs/grunt-contrib-csslint.git
NO - bower register "grunt-contrib-clean" git://github.com/gruntjs/grunt-contrib-clean.git
NO - bower register "grunt-contrib-stylus" git://github.com/gruntjs/grunt-contrib-stylus.git
NO - bower register "grunt-contrib-handlebars" git://github.com/gruntjs/grunt-contrib-handlebars.git
NO - bower register "grunt-contrib-imagemin" git://github.com/gruntjs/grunt-contrib-imagemin.git
NO - bower register "grunt-contrib-jade" git://github.com/gruntjs/grunt-contrib-jade.git
NO - bower register "grunt-contrib-less" git://github.com/gruntjs/grunt-contrib-less.git
NO - bower register "grunt-contrib-compress" git://github.com/gruntjs/grunt-contrib-compress.git
OK - bower register "grunt-contrib-requirejs" git://github.com/gruntjs/grunt-contrib-requirejs.git
NO - bower register "grunt-contrib-compass" git://github.com/gruntjs/grunt-contrib-compass.git
NO - bower register "grunt-contrib-nodeunit" git://github.com/gruntjs/grunt-contrib-nodeunit.git
NO - bower register "grunt-contrib-watch" git://github.com/gruntjs/grunt-contrib-watch.git
NO - bower register "grunt-contrib-cssmin"  git://github.com/gruntjs/grunt-contrib-cssmin.git
OK - bower register "grunt-contrib-htmlmin" git://github.com/gruntjs/grunt-contrib-htmlmin.git
OK - bower register "grunt-contrib-internal" git://github.com/gruntjs/grunt-contrib-internal.git
NO - bower register "grunt-contrib-concat" git://github.com/gruntjs/grunt-contrib-concat.git
NO - bower register "grunt-contrib-jshint" git://github.com/gruntjs/grunt-contrib-jshint.git
OK - bower register "grunt-contrib-yuidoc" git://github.com/gruntjs/grunt-contrib-yuidoc.git
NO - bower register "grunt-contrib-coffee" git://github.com/gruntjs/grunt-contrib-coffee.git
OK - bower register "grunt-contrib-jst" git://github.com/gruntjs/grunt-contrib-jst.git
OK - bower register "grunt-contrib-symlink" git://github.com/gruntjs/grunt-contrib-symlink.git
NO - bower register "grunt-contrib-copy" git://github.com/gruntjs/grunt-contrib-copy.git
OK - bower register "grunt-contrib-bump" git://github.com/gruntjs/grunt-contrib-bump.git
OK - bower register "grunt-contrib-mincss" git://github.com/gruntjs/grunt-contrib-mincss.git
OK - bower register "grunt-contrib-livereload" git://github.com/gruntjs/grunt-contrib-livereload.git

OK means it is in the bower registry, where NO means an error when submitting to the registry (a strange 403)

Can this be addressed ?

Non-working Example

// Deletes all .js files, but skips min.js files
clean: ['path/to/dir/*.js', '!path/to/dir/*.min.js'],

Actually will delete *.min.js as well. Because of the way it breaks into different operations, you will have to specify a task:

// Deletes all .js files, but skips min.js files
clean: {
    dontTazeMeBro: ['path/to/dir/*.js', '!path/to/dir/*.min.js']
}

Will work.

respect the "default" convention

Tasks are grunt's bread and butter. The stuff you do most often, like jshint or nodeunit. Every time Grunt is run, you specify one or more tasks to run, which tells Grunt what you'd like it to do.

If you don't specify a task, but a task named "default" has been defined, that task will run (unsurprisingly) by default.

http://gruntjs.com/creating-tasks

grunt-contrib-clean appears to ignore this convention. With this config:

  clean: {
    "default": ['.app/*'],
    sterilize: [".app/*", "node_modules", "server/assets/js/lib"]
  }

If I run grunt clean it runs both tasks when the convention would be to only run default.

Unlink symlinked directory target

When a clean is invoked on a symlinked folder, the symlink still appears in the folder but in a broken state. Could the clean target automatically unlink the folder?

Would something like this make more sense as a user filter? If so, could examples using symlinks be shown as well?

Thanks!

how to configure force option when using subtask

hi, I have been trying to figure out, how to add the force option to my config:

clean: {
force: true,
dist: {

    files: [{
      dot: true,
      src: [
        '.tmp',
        '<%= yeoman.dist %>/*',
        '!<%= yeoman.dist %>/.git*'
      ]
    }]

  },
  server: '.tmp'
}

I tried adding it on the "dist" level (as shown above) and it's detected but then I am getting this error:
Warning: Object true has no method 'indexOf' Use --force to continue.

How should I use it? thanks!

Cannot read property 'src' of undefined Use --force to continue

Running grunt clean:dev with my tasks set up as follows:

clean:
  dev:
    src: ['./temp/']
  prod:
    src: ['./dist/*']
  play:
    src: ['../public/*']

gives me this:
Warning: Cannot read property 'src' of undefined Use --force to continue.

Version in package.json is "version": "0.4.0a"

Doesn't work properly since node 0.10.28 or something else

I have that:

clean: {
  "all": ["web/assets"],
}

It doesn't remove the folder at all now.

I've tried:

clean: {
  "all": ["web/assets/**/*"],
}

It will remove all files but not the folders.

No verbose errors though and Files: web/assets -> all

Troubles with folders?

Windows: Warning: Unable to delete ".tmp" file (ENOTEMPTY, directory not empty

Hi I have this error when I run backbonejs generator on Windows 7 and use SASS,
I have Yeoman 1.1.2 and Nodejs 0.10.25
This error occurs when I save the main.js file.

Server display this (My DOS is running as Administrator):

Running "clean:server" (clean) task
Cleaning .tmp...ERROR
Warning: Unable to delete ".tmp" file (ENOTEMPTY, directory not empty 'C:\xampp\htdocs\backbonejs-project\.tmp').
... Reload app\scripts\main.js ...
... Reload app\scripts\main.js ...
... Reload app\scripts\main.js ...
... Reload app\scripts\main.js ...

Running "watch" task
Waiting...

In adition,
The main.css file is not found:
GET http://localhost:9000/styles/main.css 404 (Not Found)

Add ignore case option

Clean can't ignore case in source path (uppercase, lowercase)
For remove *.TXT, *.Txt, *.txt, etc. files needs many paths.

Clean task spikes CPU, attempts to clean files outside project directory

Here is my config:

module.exports = (grunt)->
    grunt.initConfig
        pkg: grunt.file.readJSON 'package.json'
        files:
            root: './'
            server: 'server/'
            serverBuild: 'build/'
            frontend: 'public/'
            frontendBuild: 'build/public/'
            frontendCompiled: 'build/public/js/app.js'

        clean:
            build:
                options:
                    'no-write': true
                src: ['<%= serverBuild %>/**/*',
                    '<%= frontendBuild %>/**/*',
                    '!<%= frontendBuild %>/lib/**/*']

Here is the result of grunt clean -v --stack:

$ grunt clean -v --stack
Initializing
Command-line options: --verbose, --stack

Reading "Gruntfile.coffee" Gruntfile...OK

Registering Gruntfile tasks.
Reading package.json...OK
Parsing package.json...OK
Initializing config...OK

Registering "grunt-contrib-uglify" local Npm module tasks.
Reading /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-uglify/package.json...OK
Parsing /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-uglify/package.json...OK
Loading "uglify.js" tasks...OK
+ uglify

Registering "grunt-contrib-coffee" local Npm module tasks.
Reading /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-coffee/package.json...OK
Parsing /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-coffee/package.json...OK
Loading "coffee.js" tasks...OK
+ coffee

Registering "grunt-contrib-watch" local Npm module tasks.
Reading /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-watch/package.json...OK
Parsing /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-watch/package.json...OK
Loading "watch.js" tasks...OK
+ watch

Registering "grunt-contrib-less" local Npm module tasks.
Reading /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-less/package.json...OK
Parsing /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-less/package.json...OK
Loading "less.js" tasks...OK
+ less

Registering "grunt-contrib-copy" local Npm module tasks.
Reading /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-copy/package.json...OK
Parsing /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-copy/package.json...OK
Loading "copy.js" tasks...OK
+ copy

Registering "grunt-contrib-clean" local Npm module tasks.
Reading /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-clean/package.json...OK
Parsing /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-contrib-clean/package.json...OK
Loading "clean.js" tasks...OK
+ clean

Registering "grunt-mocha-test" local Npm module tasks.
Reading /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-mocha-test/package.json...OK
Parsing /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-mocha-test/package.json...OK
Loading "mocha.js" tasks...OK
+ mochaTest

Registering "grunt-bower-task" local Npm module tasks.
Reading /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-bower-task/package.json...OK
Parsing /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-bower-task/package.json...OK
Loading "bower_task.js" tasks...OK
+ bower

Registering "grunt-newer" local Npm module tasks.
Reading /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-newer/package.json...OK
Parsing /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-newer/package.json...OK
Loading "newer.js" tasks...OK
+ any-newer, newer, newer-postrun

Registering "grunt-karma" local Npm module tasks.
Reading /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-karma/package.json...OK
Parsing /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt-karma/package.json...OK
Loading "grunt-karma.js" tasks...OK
+ karma
Loading "Gruntfile.coffee" tasks...OK
+ default, ezctrl_static

Running tasks: clean

Running "clean" task

Running "clean:build" (clean) task
Verifying property clean.build exists in config...OK
Warning: EACCES, permission denied '/EFI/refind/icons' Use --force to continue.
Error: EACCES, permission denied '/EFI/refind/icons'
    at Object.fs.readdirSync (fs.js:654:18)
    at Glob._readdir (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:577:20)
    at Glob._process (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:379:15)
    at Glob.<anonymous> (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:403:14)
    at Array.forEach (native)
    at Glob.<anonymous> (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:402:9)
    at Glob._readdir (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:554:32)
    at Glob._process (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:379:15)
    at Glob.<anonymous> (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:403:14)
    at Array.forEach (native)
    at Glob.<anonymous> (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:402:9)
    at Glob._readdir (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:554:32)
    at Glob._process (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:379:15)
    at Glob.<anonymous> (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:403:14)
    at Array.forEach (native)
    at Glob.<anonymous> (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:402:9)
    at Glob._afterReaddir (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:603:15)
    at Glob._readdir (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:581:17)
    at Glob._process (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:379:15)
    at Glob.iterator (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:166:10)
    at Array.forEach (native)
    at new Glob (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:164:22)
    at glob (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:57:11)
    at Function.globSync [as sync] (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/node_modules/glob/glob.js:76:10)
    at /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/grunt/file.js:112:22
    at /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/grunt/file.js:59:19
    at Array.forEach (native)
    at processPatterns (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/grunt/file.js:53:34)
    at Object.file.expand (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/grunt/file.js:110:17)
    at Object.fn [as src] (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/grunt/task.js:180:36)
    at /Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/grunt/task.js:199:24
    at Array.forEach (native)
    at Task.task.normalizeMultiTaskFiles (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/grunt/task.js:196:11)
    at Object.<anonymous> (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/grunt/task.js:250:23)
    at Object.thisTask.fn (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/grunt/task.js:82:16)
    at Object.<anonymous> (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/util/task.js:282:30)
    at Task.runTaskFn (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/util/task.js:235:24)
    at Task.<anonymous> (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/util/task.js:281:12)
    at Task.<anonymous> (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/util/task.js:215:7)
    at Task.runTaskFn (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/util/task.js:238:9)
    at Task.<anonymous> (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/util/task.js:281:12)
    at Task.start (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/util/task.js:290:5)
    at Object.grunt.tasks (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/grunt.js:155:8)
    at Object.module.exports [as cli] (/Volumes/MEDIA/redrabbit/iqilla-node/node_modules/grunt/lib/grunt/cli.js:38:9)
    at Object.<anonymous> (/usr/local/lib/node_modules/grunt-cli/bin/grunt:43:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3

Aborted due to warnings.

I have no idea what the clean task is trying to do - it seems to ignore my no-write: true option, and it momentarily spikes my cpu usage before failing. Any advice would be appreciated.

Maximum call stack size exceeded

Here is my block in grunt.initConfig()

clean: {
            js: {
                src: 'build/main.js'
            },
            proxy: {
                src: 'build/proxy.js'
            }
        }

And the task:

grunt.registerTask('clean', ['clean:js', 'clean:proxy']);

Does not work with Windows 8 & Cygwin

when this is run grunt clean is run, the following is displayed
Running "clean:0" (clean) task

files are not deleted, no "cleaning" messages are not displayed and the done message is not displayed.

When I run the same command directly in windows command line, it works fine.

Unable to clean directories on windows

The rules are being specified to clean all files and folders under tmp:
however, from time to time, it will failed to perform clean task and come out with error like this: (EPERM, operation not permitted '....tmp')
After some googling, it seems like this: http://stackoverflow.com/questions/23541343/grunt-clean-fail-unable-to-delete-tmp-file-eperm-operation-not-permitted

fixed the problem, but i think the package.json should be updated from here as well
Please verify if this is correct fix and include it in the package.json once and for all. :)

Thanks.

Cannot remove dir on windows 8

Throws error:

Running "clean:0" (clean) task
Cleaning src/main/webapp/static/js-dist...ERROR
Warning: Unable to delete "src/main/webapp/static/js-dist" file (EBUSY, resource busy or locked 'D:\xxx\src\main\webapp\static\js-dist\lib\handlebars\1.1.2'). Use --force to continue.

Aborted due to warnings.

Clean All Except?

This is probably more of a feature request but it might be nice to do clean all except a file or dir?

Force didn't work

Code:

clean : {
  languages : {
    force : true,
    src : ['../js/vendors/*.js']
  }
}

and get this message

Warning: Cannot delete files outside the current working directory. Use --force to continue.

Cannot delete nonexistent file.

I have a simple clean rule like this:

clean: {
      options: {
        force: true
      },
      clean: ["../css/**/*", "!../css/"]
},

This would delete all the files in ../css, but leave the folder ../css alone.

I have subfolders within the ../css folder and files within it. Everytime I run grunt clean,

I get warnings like this:

Cleaning "../css/somecss/mycssfile.css"...>> Cannot delete nonexistent file.

This is probably because ../css/somecss/ was deleted already. I am not sure how the internals work, but I think clean should be smart enough to know that if it has deleted a folder, it shouldn't bother deleting any of the files inside (since they should be deleted).

Unable to delete grunt-sass - EPERM error

Attempting to use clean to delete the module itself or node_modules always results in a permission error after invoking the task previously, even though deleting it from a regular windows prompt works fine.

Warning: Unable to delete "node_modules" file (EPERM, operation not permitted
`E:\Project\node_modules\grunt-sass\node_modules\node-sass\bin\win32-x64-v8-3.14\binding.node`). Use --force to continue.

Aborted due to warnings.

Cleaning symlink'd directories

If the path to be cleaned in a symlink'd directory then the clean will fail as node-glob-whatev is appending a trailing slash, i'm not sure whether this is a grunt-contrib-clean problem or node-glob-whatev?

i've submitted a pull request (cowboy/node-glob-whatev#8) to node-glob-whatev to use lstatSync which fixes the problem.

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.