Flatten.js

Discussion of the xtools Toolkit

Moderators: Tom, Kukurykus

xbytor

Flatten.js

Post by xbytor »

As promised, here it is.

This takes a javascript file and inlines all of the included files. It avoids recursive and redundant includes. It simplifies packaging of scripts for deployment. Right now, you need to manually modify the script to specify a new file. I'll leave adding File.openDialog code as an execise to the readers.

The script was run on itself before being uploaded here which is why you get all of the neat TextProcessor code in the file.

Enjoy.