- Features
- Allow for the passing of options to
app.restart()
- Allow for the passing of options to
- Features
- Updated underscore peer dependency version
- Throw a "Child app does not exist." error on startChild app when child app undefined
-
Features
Component.showIn
now supports passingregionOptions
-
Fixes
- When an app is stopped, the running events cache is now cleared correctly
viewEvents
now works if a view is shown duringonBeforeShow
- Add .npmignore
- Fix the build
-
Breaking Changes
- Replaced
Component
with a simpler API.Component
now extends `Marionette.Application- Removes
removeView
forshow
- Adds
empty
for a safe destruction - Adds
regionOptions
- A Component can now be shown multiple times
- Adds
setRegion
as a class method
- Removed the default export
MixinState
is nowmixinState
- Replaced
-
Tooling
- Modernized build/test tooling
- Features
- Updated dependency versions
-
Breaking Changes
- Upgraded to Marionette v4
Toolkit
is no longer attached toMarionette.Toolkit
noConflict
was removed- Removed bower
- For apps the state model and listeners are now only init'd during runtime available first in
onBeforeStart
without listeners. triggerStart
now calls afinallyStart
method rather thantriggerMethod
directly.
-
Features
- childApps definitions now support
regionName
andgetOptions
for boilerplate reduction. - Updated underscore dependency range
- Added
toggleState
for a quick/cleanset('foo', !get('foo'))
- Added
hasState
for a quick/cleanthis.getState().has('foo')
stopChildApp
now passes options alongthis.stopChildApp('appName', { foo: true })
Component
now exposesshowView
so that the behavior can be overriddenrestartWithParent
was added to modify the behavior of child apps duringrestart
- childApps definitions now support
-
Fixes
- Child app was not removing correctly if startAfterInitialize: true
- Fixed clean up for various app view removal methods
-
App
- Breaking Changes:
- Inits the state model before
before:start
and waits until beforestart
to delegatestateEvents
- Remove
getInitState
in favor of setting the state inbefore:start
setRegion
now returns the set region instance
- Inits the state model before
destroy
now returns the app instancedestroy
now calls the Application prototype instead of Object- Added
ViewEventsMixin
- Added
restart
andisRestarting
feature start
now accepts a view option- Added
setView
/getView
feature allowing setting up children with the App's API prior toshowView
getRegion
now accepts an argument of a region name that is sugar formyApp.getView().getRegion('regionName')
showView
will show the "set" view if not passed a 1st argument- Added
showChildView
/getChildView
for interaction with the children of the App's view
- Breaking Changes:
-
Component
- Breaking Changes:
viewEventPrefix
is now defaulted tofalse
stateEvents
is now delegated afterinitialize
this allows for setState ininitialize
- Added
ViewEventsMixin
destroy
now returns the component instance
- Breaking Changes:
-
ChildAppMixin
- Breaking Changes:
startChildApp
/stopChildApp
now return the child app instance
- Breaking Changes:
-
StateMixin
- Add
delegateStateEvents
/undelegateStateEvents
for binding and unbindingstateEvents
- Add
-
ViewEventsMixin
- This new mixin adds Marionette.View like support for view event proxying The API is analogous tochildViewEventPrefix
,childViewEvents
andchildViewTriggers
viewEventPrefix
defaulting to false allows for auto-proxying events from the view to the app or componentviewEvents
allows app or component handlers of view eventsviewTriggers
triggers an event on the app or component when an event is triggered on the view
App
- Fix
stateEvents
when passed at App instantiation - Fix leaky lingering
stateEvents
after App stop - Add App
showChildView
/getChildView
- Fix
App
- Revert the stop event is triggered after clearing running events
App
- Add
setRegion
to modify an App's region- All
region
to be passed toApp#start
- All
start
andstop
are no longer binded to the App- the stop event is triggered after clearing running events
- Add
- General
- Support lodash v4
- Fixed an underscore import
App
- The
App
now extendsMarionette.Application
- Breaking Changes:
- Move
initState
fromApp
constructor tostart
- Remove
restartState
functionality
- Move
- Add
getInitState
functionality to allow user to override and modify state on Appstart
- Remove
isDestroyed
functionality andisDestroyed
flag as this is now supported inMarionette.Application
- Allow user to pass in
StateModel
duringApp
initialization viaClassOptions
- Breaking Changes:
- The
Component
- ViewClass now uses
Marionette.View
instead of deprecatedMarionette.ItemView
- Add
getRegion
functionality
- ViewClass now uses
StateMixin
- Now uses
unbindEvents
instead ofunbindEntityEvents
- Now uses
ChildAppsMixin
- Add
startChildApp
/stopChildApp
functionality
- Add
- Dependency
- Update and hard-set various dependencies, including Marionette, Backbone, and underscore
StateMixin
:- Replaces
StateClass
and is now a POJO instead of aMarionette.object
- Can now be mixed into any
Marionette.Object
orMarionette.View
stateDefaults
has been removed in favor of state being passed inoptions
hashinitState
adds ability to reinitialize state at any point during the life-time ofMarionette.object
/Marionette.View
resetStateDefaults
adds ability to reset state defined in defaultsdestroyState
has been replaced by_destoryState
to privatize state deletion
- Replaces
ChildAppsMixin
:- Now handles the adding and removing of childApps
- Adds functionality to share options with all children via
childAppsOptions
EventListenerMixin
now handlesApp
event-listener functionalityMarionette.Toolkit.MixinState
is a utiltiy function created to make it easy to mixStateMixin
into anyMarionette.object
orMarionette.View
AbstractApp
has been removed and functionality moved intoApp
App
:- Now extends Marionette.Object and not
StateClass
asAbstractApp
previously did - It now mixes in
StateMixin
,ChildAppsMixin
, andEventListenerMixin
- An app can now be restarted and have it's state reinitialized via
restart
_isDestroyed
is now the last action ofdestroy
method to align with Marionette v3
- Now extends Marionette.Object and not
Component
:- Now extends a
Marionette.Object
and notStateClass
- It now mixes in
StateMixin
- Stop passing entire
stateModel
tocurrentView
in favor of passing onlyattributes
- Now extends a
- Improve
ES6
usage - Dependency:
- Change
dependencies
topeerdependencies
- Update to
Node
v4 and several other updates
- Change
- Build process updates:
- Remove
_buildPackages
andNPM
deploy functionality as project will no longer publish packages individually - Replace
Browserify
build process withRollup
- Move from
JSHint
toESLint
- Remove
- Test and Documentation updates
- Deprecate modularized classes.
- Updated underscore and backbone dependencies.
- Small refactor to defaulting empty passed in
options
as an object.
- Toolkit now exports
App
,Component
andStateClass
to npm separately. StateModel
can now be defined as a function returning aBackbone.Model
- A
Component
ViewClass
can now be defined as a function returning a View - If defining
childApps
as a function, it is now passed the sameoptions
asinitialize
- Prevent an
App
from destroying more than once
- Revert 0.2.2 bugfix
- Returning Toolkit as a require object
var Toolkit = require('Marionette.Toolkit');
- Add name to childApp Instance and getName method
- Add bower.json definition
- Add appName to
DuplicateChildAppError
- Bug Fix - Passed in options to child app on start
- No code changes
- Fixed html test runner
- Documentation update with version bump for npm publish ¯_(ツ)_/¯
- 100% Code Coverage @brentli1!!
Component
now mixes in theStateModel
instance asstateModel
instead ofmodel
stateDefaults
are now onStateClass
anddefaults
was removed from `Component- Added
Toolkit.noConflict
App
now has atriggerStart
method that can be overridden to introduce async app startsApp
buildApp
is now easier to overrideComponent
buildView
is now easier to override- You can now pass
options
to theComponent
's view viashowIn
show
andrenderView
Component
now attaches its view ascurrentView
instead ofview
- bugfixes
- Bug fixes for
StateClass
andApp
- Tests for
App
- Initial release