igrep / keep-me-contributing

Moved to https://github.com/igrep/keep-me-contributing-kt
https://keep-me-contributing.igreque.info/
MIT License
1 stars 0 forks source link

Can't closure-compile on Windows #13

Open igrep opened 9 years ago

igrep commented 9 years ago
$> chcp 65001
Active code page: 65001

$> npm run build

> keep-me-contributing@0.1.0 build C:\keep-me-contributing
> grunt default

Running "shell:lint" (shell) task

Running "shell:buildFrontend" (shell) task
'--output_wrapper' is not recognized as an internal or external command, operable program or batch file.
Warning: Command failed: C:\Windows\system32\cmd.exe /s /c "java -jar node_modules/google-closure-compiler/compiler.jar --only_closure_dependencies --closure_entry_point="KeepMeContributing" --create_source_map="app/js/app.js.map" --source_map_location_mapping=app\| --output_wrapper "%output%//# sourceMappingURL=/js/app.js.map" --compilation_level=SIMPLE --language_in=ECMASCRIPT6 --language_out=ECMASCRIPT5_STRICT --jscomp_error=constantProperty --jscomp_error=const --jscomp_error=checkRegExp --warning_level=VERBOSE --jscomp_warning=checkDebuggerStatement --js=app/lib/google-closure-library/closure/goog/**.js --js=!app/lib/google-closure-library/closure/goog/**test.js --js=app/lib/google-closure-library/third_party/closure/goog/**.js --js=!app/lib/google-closure-library/third_party/closure/goog/**test.js --js=app/js/KeepMeContributing/**.js --js_output_file=app/js/app.js"
'--output_wrapper' is not recognized as an internal or external command, operable program or batch file.
 Use --force to continue.

Aborted due to warnings.

...
igrep commented 9 years ago

Seems that the cause is | character in --source_map_location_mapping=app\| option. I thought it might fix this bug to execute closure compiler in app directory not to use source_map_location_mapping option.

igrep commented 9 years ago

Didn't work... I don't know why, but the source map was not generated as I expected though changing the current directory of shell:buildFrontend task: app.js.map was created, and its content looks good, but Chrome never mapped it to the source files.

igrep commented 9 years ago

Maybe the only way is using https://nodejs.org/api/child_process.html directly... With this, we can execute a command without shell (of course including the infamous cmd.exe!) But why isn't such a feature provided by both Grunt and Gulp? :confused: