Package application files as a Total.js bundle
A Total.js application bundle is an archive created with BACKUP(), placed in the application's bundles/ directory with the .bundle suffix. At startup LOAD() extracts bundles and combines application files into .src/; the framework then uses that directory as its application root. Bundle filenames containing -bk.bundle or _bk.bundle are ignored. A bundles.debug file reuses the already extracted .src directory.
The source also supports .url files that fetch remote bundle archives. Bundle files contain executable application code: load trusted archives only. Keep credentials, runtime databases and private files out of distributable archives. BACKUP is packaging, not encryption.
exports.install = function() {
ROUTE('GET /bundle-loader/', $ => $.json({ load: typeof LOAD, backup: typeof BACKUP }));
};