Consolidating tools

72 views
Skip to first unread message

Ivan Sagalaev

unread,
Jan 5, 2011, 6:01:28 PM1/5/11
to highl...@googlegroups.com
Here's an idea I'd like to discuss before implementing.

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.

Igor Kalnitsky

unread,
Jan 5, 2011, 6:40:59 PM1/5/11
to highl...@googlegroups.com
I think it's a good idea! =)

ixti

unread,
Jan 6, 2011, 6:20:23 AM1/6/11
to highlight.js
This script is a good idea, IMHO. About option key, I think it will be
more
standard-way to name it simply: --no-compress

Ivan Sagalaev

unread,
Jan 16, 2011, 3:34:58 AM1/16/11
to highl...@googlegroups.com
On 01/05/2011 03:01 PM, Ivan Sagalaev wrote:
> 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

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.

Reply all
Reply to author
Forward
0 new messages