gruntjs / grunt-contrib-clean Goto Github PK
View Code? Open in Web Editor NEWClear files and folders.
Home Page: http://gruntjs.com/
License: MIT License
Clear files and folders.
Home Page: http://gruntjs.com/
License: MIT License
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?
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.
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.
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?
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.
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
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?
It would be nice if there was an option to have a shorter console output. Something like:
Running "clean" (clean) task
>> 355 files cleaned.
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
0.4.0rc5 not in npm repository (currently version 0.4.0a is in repo).
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?
You can now use peerDependency
since npm 1.2.x to specify target grunt version.
More details about peerDependency
:
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"
]
"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?
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 ;)
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.
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']);
};
Hi, the package.json in [email protected] declared that it dependent grunt-contrib-lib but the clean.js require('grunt-lib-contrib')
at the commit, so the name is different and caused an error.
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"
]
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...
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?
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 ?
// 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.
Does this project need Travis-CI?
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.
Such as .htaccess
When I pass a directory to this task, I want an option to only clean its contents, not delete it completely.
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!
Say I wanted to delete everything but a certain folder. How do you do this?
Looks like line 20 of the current "latest" install has a typo (looks for this.file
instead of this.files
, which throws an error).
This can be solved by specifying a version (for instance npm install [email protected]
), but npm install grunt-contrib-clean@latest
should probably point to a working version ๐.
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!
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"
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?
https://gist.github.com/8d9b87dd79fec0fce5ed
I've installed so [email protected] and it works like a charm.
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)
Clean can't ignore case in source path (uppercase, lowercase)
For remove *.TXT, *.Txt, *.txt, etc. files needs many paths.
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.
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']);
Detailed here: http://stackoverflow.com/questions/22457004/grunt-contrib-clean-task-doesnt-delete-files-with-network-src-path, but it seems to have been ignored.
A change made here: 480b9f9#commitcomment-2234685 is not reflected in the latest npm repo. It causes the console to whine about options not being found :(
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.
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.
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.
This is probably more of a feature request but it might be nice to do clean all except a file or dir?
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.
clean: {
force: true,
target: ["<%= pkg.buildDir %>", "<%= releaseDir %>", "<%= pkg.buildDir %>"]
},
call grunt build
and it fails unless I use grunt build --force
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).
I attempt to run 'grunt clean', with config
clean: {
folderOne: 'dist/**/*.*'
},
... but I keep getting this error:
TypeError: Object # has no method 'registerHelper'
I have Grunt 0.4.1
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.