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

Could not call YUICSSOptimizer/ClosureJSOptimizer #103

Closed
richardcornish opened this issue Aug 30, 2014 · 7 comments
Closed

Could not call YUICSSOptimizer/ClosureJSOptimizer #103

richardcornish opened this issue Aug 30, 2014 · 7 comments

Comments

@richardcornish
Copy link

When I run cactus build or cactus serve, I get errors related to my use of optimize in config.json:

Could not call external processor YUICSSOptimizer: [Errno 2] No such file or directory
Could not call external processor ClosureJSOptimizer: [Errno 2] No such file or directory

When I load up a console, importing them like static/static_optimizers.py does loads them no problem, so I don't know what I'm doing wrong.

>>> from cactus.contrib.external.yui import YUICSSOptimizer`

I'm using the v3 branch.

My config.json:

{
    "fingerprint": [
        "js",
        "css"
    ],
    "optimize": [
        "js",
        "css"
    ],
    "prettify": true
}
@krallin
Copy link
Collaborator

krallin commented Aug 30, 2014

You're probably missing YUI or the closure compiler on your workstation.

Cheers,
On Aug 30, 2014 7:19 AM, "Richard Cornish" notifications@github.com wrote:

When I run cactus build or cactus serve, I get errors related to my use
of optimize in config.json:

Could not call external processor YUICSSOptimizer: [Errno 2] No such file or directory
Could not call external processor ClosureJSOptimizer: [Errno 2] No such file or directory

When I load up a console, importing them like static/static_optimizers.py
does loads them no problem, so I don't know what I'm doing wrong.

from cactus.contrib.external.yui import YUICSSOptimizer`

I'm using the v3 branch.

My config.json:

{
"fingerprint": [
"js",
"css"
],
"optimize": [
"js",
"css"
],
"prettify": true
}


Reply to this email directly or view it on GitHub
#103.

@krallin
Copy link
Collaborator

krallin commented Aug 30, 2014

Just to clarify that last point

The IOError you are seeing is for the external processor (e.g. closure
compiler). It's not for the plugin file.

Cheers,

@richardcornish
Copy link
Author

Thanks, I didn't realize they were external dependencies. Both can be installed with Homebrew. I installed YUI, but Closure requires Java 7, which is no longer installed on Mavericks.

I like the lightweight idea of the plugin system, but the front-end related ones seem to cover near identical ground to Grunt. Optimizing and fingerprinting is good, but there's no uglifying or concatenating. Forgive me if I'm not seeing the larger picture.

@krallin
Copy link
Collaborator

krallin commented Aug 30, 2014

Hi there,

The plugin system is intentionally very flexible, and actually gives you
sufficient flexibility to integrate with the frontend framework(s) of your
choice (i.e. your plugin can totally rewrite Cactus's list of discovered
static assets, and Cactus won't mind).

For one, I integrated with require.js and scss (I believe grunt wasn't
really a thing just yet when I worked on this).

So, to answer your original question. Yes, the built-in minification
plugins are a lightweight solution. However, if you find them too limited,
or somehow just prefer something else, you definitely don't have to use
them.

Cheers,
On Aug 31, 2014 12:15 AM, "Richard Cornish" notifications@github.com
wrote:

Closed #103 #103.


Reply to this email directly or view it on GitHub
#103 (comment).

@AeonFr
Copy link

AeonFr commented Dec 15, 2015

Sorry for being so basic, but I have no idea how to install YUI whatsoever, so I looked it in the Ubuntu Software Center and found at leat 4 packages that have "YUI" in the name, but after installing a few the error keeps appearing :/
yui-what

I'm also getting the ClosureJSOptimiser message, and I don't wanna keep messing up with things I don't understand, as long as I don't have to. Is there anything wrong in systematically ignoring this messages?

@richardcornish
Copy link
Author

YUICSSOptimizer is the name of a Cactus plugin. Under the hood it uses YUI Compressor, which is a Java jar package. The GitHub page is at https://github.com/yui/yuicompressor.

ClosureJSOptimizer is also the name of a Cactus plugin. It uses Google Closure Compiler, which is a also a Java jar package. The GitHub page is at https://github.com/google/closure-compiler.

I have a Mac, and thus use Homebrew to make my life easy to install these packages. If you're on Ubuntu, it seems like the best thing to do would be to create your own builds with Ant, which seems to be available as an Ubuntu package (apt-get install ant). But first you would need Java on Ubuntu because Ant, YUI Compressor, and Google Closure Compiler all require it as a dependency.

@AeonFr
Copy link

AeonFr commented Dec 16, 2015

OK, thanks for the advice.... I've already checked and I do have java in my computer. I didn't knew how to install the pacakges after downloading them, I will check Ant later 👍

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