jsmin.py is worlds slower than jsmin.c (I benchmarked one project at 10+s for Python and <2s for C). I think the author will want to use the latter.
Also, without the ability to build a dependency graph (something Closure Tools excel at), I'm not sure that this is much better than a simple shell script like:
dest=/tmp/build.js
echo > $dest
for js in $(cat build.order); do
cat "$js" >> $dest
done
jsmin < $dest > out.js
(The same for CSS, but using slimmer).
At least then you don't have to write your script order in YAML.
Since this is a tool I built for me and open sourced, rather than a project I designed to be open source, I'll try and explain some of my design decisions.
jsmin.c is faster, but since this is something run server-side once per build, I've never seen speed as much of a problem. On my build server this script completes in <1 second for all the files I've ever tried (My build server is Intel i7, so that might have something to do with it). Even so compared to the time needed to rsync the files to the app servers, or compress the images, this doesn't really make much difference.
Dependency graphs are cool and useful, but the idea of this project is, very much, to simply cat files together. It also has the advantage of being able to generate the bundle info file so you can use URLs with hashes in for CDN's/cache-ability (Like Rails asset pipeline does).
So in short, it was built to be a shit simple system to make my life easier, if you dislike it feel free to use something else, as is the nature of Open Source
2 comments
[ 2.8 ms ] story [ 9.0 ms ] threadAlso, without the ability to build a dependency graph (something Closure Tools excel at), I'm not sure that this is much better than a simple shell script like:
(The same for CSS, but using slimmer).At least then you don't have to write your script order in YAML.
jsmin.c is faster, but since this is something run server-side once per build, I've never seen speed as much of a problem. On my build server this script completes in <1 second for all the files I've ever tried (My build server is Intel i7, so that might have something to do with it). Even so compared to the time needed to rsync the files to the app servers, or compress the images, this doesn't really make much difference.
Dependency graphs are cool and useful, but the idea of this project is, very much, to simply cat files together. It also has the advantage of being able to generate the bundle info file so you can use URLs with hashes in for CDN's/cache-ability (Like Rails asset pipeline does).
So in short, it was built to be a shit simple system to make my life easier, if you dislike it feel free to use something else, as is the nature of Open Source