JSPP

JSPP is a pre-compiler with Javascript syntax, similar in function to C's CPP. You could use JSPP for many languages but it's naturally suitable for Javascript.

When used with Javascript, JSPP adds the following functionality:

In particular, this allows you to easily share code between projects without including the code that isn't shared.

If you're writing serious Javascript and don't intend to use m4, then I suggest you take a look at these examples.

Notes

	JSPP is released under the GPL
	It is written in C
	It should compile on any unixy system, e.g. Linux
	It has not yet been ported to Windows
	It wants a Javascript shell installed, such as Mozilla's Spidermonkey ($ apt-get install spidermonkey-bin)
	Processing foreign code can't exec arbitary code (when used with Spidermonkey)
	You can run "$ jspp -p project.js | less" to see the Javascript it passes to the shell
	You can run "$ jspp -p project.js | js - | less" to see what the shell passes back

To Do: Write full documentation

You can email me at <support@[thisdomain]>

Download source code (version 0.02, 17k)