Currently there are two scripts in the "tools" directory: one for
packing raw .js files and another for building them together into the
final highlight.pack.js. I plan to make it a single script that can be
invoked like this:
./build.py [--dont-compress] [language ..]
It will do both compressing (unless --dont-compress specified) and
building. I believe this'll save a fair amount of key presses when
debugging.
I can't really imagine anything bad about this idea but I'd like to
check anyway. Suggestions for a shorter name for "--dont-compress" are
also welcome.
And finally I did it:
https://github.com/isagalaev/highlight.js/commit/d4f93888b2c2a725f3efbf162c928b4e205bd4e8
Now it's just:
python build.py [-n, --no-compress] [language...]
I believe this will work for all common use-cases:
- debugging a single language: `build.py -n language`
- testing the whole suite: `build.py -n`
- production build: `build.py language1 language2 ...`
There's also one side-effect: the temporary dir "packed/" is no longer
created.