We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If the directory name ends in .js, Grunt version of google-closure-compiler treats a directory as a file.
.js
Files: js/Clipboard.js -> js/Clipboard.min.js Files: js/Clipboard.js/KiraSimple.js -> js/Clipboard.js/KiraSimple.min.js Fatal error: EISDIR: illegal operation on a directory, read
See this configuration on the KiraGoogleClosureCompilerJSInPath branch of my GitHub repository for debugging and demonstrations.
KiraGoogleClosureCompilerJSInPath
Gruntfile.coffee:
Gruntfile.coffee
module.exports = (grunt) -> require('google-closure-compiler').grunt grunt grunt.initConfig 'closure-compiler': target: files: [ expand: true cwd: "js/" src: ['**/*.js'] dest: "js/" ext: '.min.js' ]
js/Clipboard.js/KiraSimple.js:
js/Clipboard.js/KiraSimple.js
alert('Kira Goddess!');
The part of the package.json:
package.json
{ "devDependencies": { "google-closure-compiler": "^20220905.0.0", "grunt": "^1.5.3" } }
The part of the .travis.yml:
.travis.yml
install: - npm install -g google-closure-compiler grunt-cli - npm install script: - google-closure-compiler --js="js/**.js" - grunt closure-compiler --verbose --stack
Successful compilation without errors. I get it if:
I use directory name without characters “.js” at the end instead of directory “Clipboard.js”.
For google-closure-compiler CLI I can’t reproduce the bug, see Travis build:
$ google-closure-compiler --js="js/**.js" alert("Kira Goddess!"); The command "google-closure-compiler --js="js/**.js"" exited with 0.
See Travis build:
Initializing Command-line options: --verbose, --stack, --gruntfile=/home/travis/build/Kristinita/SashaGruntDebugging/Gruntfile.coffee Reading "Gruntfile.coffee" Gruntfile…OK Registering Gruntfile tasks. Initializing config…OK Loading "Gruntfile.coffee" tasks…OK + closure-compiler Running tasks: closure-compiler Running "closure-compiler" task Running "closure-compiler:target" (closure-compiler) task Verifying property closure-compiler.target exists in config…OK Files: js/Clipboard.js -> js/Clipboard.min.js Files: js/Clipboard.js/KiraSimple.js -> js/Clipboard.js/KiraSimple.min.js Options: args=undefined Options: args=undefined Fatal error: EISDIR: illegal operation on a directory, read Error: EISDIR: illegal operation on a directory, read The command "grunt closure-compiler --verbose --stack" exited with 3.
Operating system
grunt-cli v1.3.2, grunt v1.5.3
google-closure-compiler v20220905
Thanks.
The text was updated successfully, but these errors were encountered:
I haven't investigated, but it's not hard to imagine this assumption creeping in somewhere.
@ChadKillingsworth, do you have a comment/opinion here?
Sorry, something went wrong.
It seems likely that this is within the grunt plugin in some way. It will take some research to figure out exactly what is causing the issue.
No branches or pull requests
1. Summary
If the directory name ends in
.js
, Grunt version of google-closure-compiler treats a directory as a file.2. MCVE
See this configuration on the
KiraGoogleClosureCompilerJSInPath
branch of my GitHub repository for debugging and demonstrations.Gruntfile.coffee
:js/Clipboard.js/KiraSimple.js
:The part of the
package.json
:The part of the
.travis.yml
:3. Behavior
3.1. Desired
Successful compilation without errors. I get it if:
I use directory name without characters “.js” at the end instead of directory “Clipboard.js”.
For google-closure-compiler CLI I can’t reproduce the bug, see Travis build:
3.2. Current
See Travis build:
4. Environment
Operating system
grunt-cli v1.3.2, grunt v1.5.3
google-closure-compiler v20220905
Thanks.
The text was updated successfully, but these errors were encountered: