This file contains hidden or 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
const companyMachine = Machine({ | |
id: 'company', | |
initial: 'tentative', | |
context: { | |
hasActiveContract: true, | |
minUntilDate: new Date('2020-12-31') | |
}, | |
states: { | |
tentative: { | |
always: 'sales', // TODO for now |
This file contains hidden or 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
const channelMachine = Machine({ | |
initial: 'joining', | |
states: { | |
joining: { | |
}, | |
joined: { | |
on: { | |
// Error thrown: TypeError: Cannot read property 'target' of null |
This file contains hidden or 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
const fetchRoute = () => { | |
return new Promise((resolve, reject) => { | |
resolve({ | |
stops: [{ id: 1 }, { id: 2 }] | |
}) | |
}) | |
} | |
const stopMachine = Machine({ | |
id: 'stop', |
This file contains hidden or 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
const appMachine = Machine({ | |
id: 'app', | |
type: 'parallel', | |
context: { | |
setupDone: true // TODO must be false, true for now to skip setup | |
}, | |
states: { | |
update: { | |
initial: 'idle', | |
states: { |
This file contains hidden or 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
const stopMachine = Machine({ | |
id: 'stop', | |
initial: 'idle', | |
context: { | |
id: undefined | |
}, | |
states: { | |
idle: { | |
on: { | |
START: 'pending', |
This file contains hidden or 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
class SassCompiler extends MultiFileCachingCompiler { | |
// That's a method to override from Meteor | |
// see: https://github.com/meteor/meteor/blob/devel/packages/caching-compiler/multi-file-caching-compiler.js#L57 | |
// Meteor has a build system with caching files. | |
// Meteor will find all relevant files with given extension and call this method on each of them | |
// passing the processed file and all other files that matches the extension. | |
compileOneFile(inputFile, allFiles) { | |
let matchHistory = []; | |
let prevMatch = ''; |
This file contains hidden or 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
.dumb { | |
font-size: 1.2em; | |
color: white; | |
background: #3A44BE; | |
padding: .1em 0; | |
box-shadow: 10px 0 #3A44BE,-10px 0 #3A44BE,10px 5px #FFE000,-10px 5px #FFE000; | |
} | |
body { | |
font-family: Arial; |