Closed yuchi closed 9 years ago
We can now call require('titaniumifier/packer').pack.getBundle
to get a Promise of a browserify bundle. APIs still are horrible. We’ll sort things out while working on the last point of the list.
/cc @tonylukasavage: we’re working on npmifier again, since we found how to modify the app JS resources without touching the Resources directory. This is somewhat related ;)
Some ideas to triage/implement
require.length === 2
to avoid errorstitaniumifier/manifest
gets a package.json and gives back a manifesttitaniumifier/bundle
is just a preconfiguredbrowserify
(similar to deprecated @tonylukasavage’stitaniumifiy
) and sharesbrowserify
’s APItitaniumifier/build
gets an entry point and builds a CommonJS module zip out of it.browserify
API in place we can read from `Resources//*.jsor
app/*/.js** for every occurence of
require('npm/something'), build a **single bundle for all of them** and have a companion
Resources/npm/something.jscall the bundle’s
require; it’s a matter of
module.exports = PRELUDE_HEREbecause it returns the internal
require()`.