Giter Site home page Giter Site logo

Comments (7)

krallin avatar krallin commented on June 8, 2024

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

Cheers,
On Aug 30, 2014 7:19 AM, "Richard Cornish" [email protected] 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.

from cactus.

krallin avatar krallin commented on June 8, 2024

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,

from cactus.

richardcornish avatar richardcornish commented on June 8, 2024

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.

from cactus.

krallin avatar krallin commented on June 8, 2024

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" [email protected]
wrote:

Closed #103 #103.


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

from cactus.

AeonFr avatar AeonFr commented on June 8, 2024

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?

from cactus.

richardcornish avatar richardcornish commented on June 8, 2024

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.

from cactus.

AeonFr avatar AeonFr commented on June 8, 2024

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 👍

from cactus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.