Changelog
4.0.0
Window
and Document
are now automatically resolved (unless you register your own dependency of the same name)nodeModules
and globals
optional
flagTS
inference, or explicitly pass an array of deps.factory
.service
and .resolve
opts
parameter when registering a factory i.e. .factory<A>(fn, { lifecycle: 'none' })
opts
parameter when resolving i.e. .resolve<A>({ optional: true })
resolveWith
now has a nicer syntax for ts inference: .resolveWith<Foo, Dep1, Dep2>([ 'val1', 'val2' ])
. The original syntax i.e. .resolveWith({ dep1: 'val1' })
is still valid.$options
. You can no longer do .resolve({ foo: 'someValue' })
$resolve
precedence
option lets you determine if a factory should overwrite an existing factory or notjpex/dist/es5.js
jpex.alias<From, To>()
Window
without registering it first, rather than throw an error, you will now get the global variablejpex.factory('foo', (depA, depB) => { ... })
as we no longer parse the function and extract the dependencies..factory<A>(fn).lifecycle.application()
you must now do .factory<A>(fn, { lifecycle: 'application' })
clearCache('a', 'b', 'c')
whereas previous it took an array.factory<A>([ 'b' ], fn)
Lifecycle
is now a type rather than an enum__
will no longer make it optional, you must explicitly pass the optional flag$options
and $resolve
functionality have been removedjpex/dist/es5.js
or create an alias for itChangelog
3.5.1
require
being used which meant it couldn't make optimizationsChangelog
3.5.0
Changelog
3.4.0
publicPath: true
and it will use the name
property of your app's package.json
as the public path$options
$namedParameters
and $resolve
now have corresponding type exports Options
NamedParameters
and Resolve
Changelog
3.3.3
Changelog
3.3.1
Changelog
3.3.0
jpex.extend
option: inherit
(defaults to true
). Determines if the extended container should inherit factoriesChangelog
3.2.2