Skip to content
New issue

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

no output with uglifyjs on windows #286

Open
ebrost opened this issue Jun 8, 2016 · 3 comments
Open

no output with uglifyjs on windows #286

ebrost opened this issue Jun 8, 2016 · 3 comments

Comments

@ebrost
Copy link

ebrost commented Jun 8, 2016

i'm using the plugin for cake2 and everything seem ok but i can't get any js file while uglify is declared

my ini file:

;
[General]
cacheConfig = false
alwaysEnableController = false

[filter_UglifyJs]
node=C:\nodejs\node.exe
;node_path=C:\Users\manu\AppData\Roaming\npm\node_modules
node_path=node_modules\uglify-js\bin
uglify =C:\Users\manu\AppData\Roaming\npm\node_modules\uglifyjs\bin\uglifyjs

[js]
;baseUrl = http://cdn.example.com
timestamp = true
paths[] = WEBROOT/*
paths[] = WEBROOT/js/*
paths[] = app/Plugin/Agenda/webroot/js/*
paths[] = app/Plugin/Administration/webroot/js/*
cachePath = WEBROOT/cache_js
;filters[] = UglifyJs

; Each target should have a section defining the files
; everything after js_* is considered the build file.
; all files included in the build are relative to the parent
; paths key.
;
; targets can include their own filters.
[common.js]
files[] = bower_components/bootstrap/dist/js/bootstrap.js
files[] = bower_components/jasny-bootstrap/dist/js/jasny-bootstrap.min.js
filters[] = UglifyJs

and the output :

`Welcome to CakePHP v2.8.4 Console
---------------------------------------------------------------
App : app
Path: C:\wamp\www\culturo\app\
---------------------------------------------------------------

Building files defined in the ini file
---------------------------------------------------------------
Saving file for common.v1465402139.js
Error: (node) util.print is deprecated. Use console.log instead.

Building files in views
---------------------------------------------------------------
Done.
@markstory
Copy link
Owner

I've never used node on windows, so I don't think I'll be much help. You might have to dig through the UglifyFilter and see where things are going wrong.

@ebrost
Copy link
Author

ebrost commented Jun 9, 2016

Ok.
after diing ( aliitel), le probleme eis comming from the exception thrown in function _rumcmd:

if ($Process->error()) {
            throw new RuntimeException($Process->error());
        }

wich is blocking the file generation despite the fact the "error" is much more a warning...

As i'm in a hurry, i just change it to :

if ($Process->error()) {
            var_dump($Process->error());
        }

@raisen
Copy link

raisen commented Nov 16, 2016

I was facing similar problem on a Linux machine, and I fixed by using this version of UglifyJS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants