|
Project Information
|
Please note: This project is not affiliated in any way with the official Closure Tools projects. It is meant to be used in conjunction with the Closure Library and Compiler, and may hopefully some day be refined enough for inclusion with those tools. As of today, though, that is not the case. Code Splitting for Closure ToolsI've been enamored with the idea of "code splitting" ever since I first heard about it in GWT 2.0 from 2009's Google I/O talks. Unfortunately, I'm not enamored with Java; alternatively, I really enjoy Javascript and I love Closure Tools. Thanks to Nathan's clue in the Opening Up Closure Library talk and Andrew Mattie for the link to this thread on the closure-library-discuss group. Looking at the example in that post, though, it was immediately clear that manually building that compiler command would be a nightmare. In addition, after a little experimentation I found that it was impossible (at least I couldn't find a way) to use closurebuilder.py to place goog.* dependencies directly in the module that uses them. GoalsMy #1 hope with this project is that someone says to me "There's a much simpler way!" Barring that, I wrote this script to automate the generation and execution of the compiler command and to include the goog.* namespaces with the module that first uses them, as opposed to creating one large file in the base module that has to be downloaded on every use of the app. Project StatusAt the moment, this script is for the most part working prototype code. It makes many assumptions, as I was more interested in getting the script to work than building the complexity of command-line arguments into it from the beginning. Over time, I'd like to update the script to replace those assumptions with user-defined arguments. |