Hey everyone, so I've been assigned the task of performing several upgrades to the existing build process.
Goals
- Use google closure for javascript files. [completed]
- Use yui compressor for css files. [completed]
- Create the following js files: aloha-deps.js, aloha-plugins.js, aloha-core.js, aloha.js (combined) [completed]
- Create the following css files: aloha-deps.css, aloha-plugins.css, aloha-core.css, aloha.css (combined) [partially completed]
- Combine the plugins and the core's language files into one dictionary for each language [not yet started]
Status
It's all going quite well, you can see the current status here:
http://github.com/balupton/Aloha-Editor/tree/newbuilder/build/
CSS Packaging Issue
As we now package all the css files into one file (so plugin css files are merged with the aloha css files into just one css file) we must alter the urls of CSS includes appropriately. For example the following:
background-image: url(images/image-align-none.png)
would be changed in the packaged file to:
background-image: url(./plugins/com.gentics.aloha.plugins.Image/images/image-align-none.png)
Now... This is going to be quite complicated if the CSS files are done as is (as all the plugins include files differently, some use url, some use "", some use import, some use ./, some use ../, some don't use anything). To make this as simple as possible and easiest to maintain and trouble free I have a proposal.
Proposal for CSS Includes
To simplify the build process could all CSS includes in all CSS files in the Aloha Core and Aloha Plugins please include files by ensuring the prefix ./
exists in the include. So for example:
background-image: url(images/image-align-none.png);
# becomes
background-image: url(./images/image-align-none.png);
background-image: url("images/image-align-none.png");
# becomes
background-image: url("./images/image-align-none.png");
background-image: url("../images/image-align-none.png");
# becomes
background-image: url("./../images/image-align-none.png");
@import "css2.css";
# becomes
@import "./css2.css";
@import url(css2.css);
# becomes
@import url(./css2.css);
@import url("css2.css");
# becomes
@import url("./css2.css");
@import url("../css2.css");
# becomes
@import url("./../css2.css");
This will allow me to just have to search for the ./
string to replace in the build process - which is far easier. As I really don't want for the builder to be duplicating syntax of Minify or CSScaffold in the end, the builder should be as simple as possible not an entire framework alternative!
All good? Good :-)
Question about Dictionary Packaging
This could be quite complicated as there is a lot of in-javascript code that relies on the current structure of dictionary files. This should be slated for the 0.9.4 release and NOT the 0.9.3 release.
Comments, Questions, Concerns
Feedback welcome! :-)