Last active
September 1, 2016 21:56
-
-
Save balkhaev/abad57b5eefdfe72f8af611eb11fbedb to your computer and use it in GitHub Desktop.
Fabrica for Machine,js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Machine from 'machine.js' | |
import StateMachine from 'stateMachine.js' | |
import ViewStateMachine from 'viewStateMachine.js' | |
const fabrica = new Fabrica({ | |
details: [ storeDetail, domDetail, lodashDetail, restDetail ], | |
components: [ flashbackComponent, spectatorComponent, apinatorComponent ], | |
mechanisms: [ ], | |
machnies: { | |
ViewStateMachine, | |
StateMachine, | |
Machine | |
} | |
}) | |
fabrica.addRecipe({ | |
name: 'frontendMachine', | |
machine: 'StateMachine' | |
elements: { | |
details: 'store, dom', // details.split(',').map(detailName => detailName.trim() + 'Detail') | |
components: 'flashback, spectator, apinator' | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment