Question

I've been using YUI3 to develop my personal project.

I like YUI3, except that it looks like there's no way to combine all the dependencies into one single js file. I use RequireJS as well and its optimizer does the job very well.

is there YUI3 optimizer or a similar tool?

Était-ce utile?

La solution

A quick way to do this (for core YUI modules) is the YUI Configurator: http://yuilibrary.com/yui/configurator/ -- this will build you two minified rollup files for all the base JS and CSS you need.

The core team is working on a tool called "Grifter" that will do the same thing, but also handle non-core modules.

You may also want to look into using a combo loader, rather than a single JS file. It depends whether you basically need to load the same JS on every page (single file is good), or whether your JS varies a lot from page to page (combo loader is good).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top