src
├── layouts
│ └── default.html
├── pages
│ └── index.html
├── data
│ └── i18n
│ ├── cn.json
│ └── template.html
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 isGasable = (context) => context.temperature >= 100 | |
const isFreezable = (context) => context.temperature < 0 | |
const isLiquidable = (context) => context.temperature > 0 && context.temperature < 100 | |
const waterMachine = Machine({ | |
id: 'waterMachine', | |
initial: 'ice', | |
context: { | |
temperature: 0 | |
}, |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 waterMachine = Machine({ | |
id: 'waterMachine', | |
initial: 'ice', | |
states: { | |
ice: { | |
on: { | |
FUSION: 'liquid', | |
SUBLIMATION: 'gas' | |
} | |
}, |
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
// Service mocks (you can change it) | |
function obtainTokenService() { | |
return new Promise(async (resolve, reject) => { | |
//reject('oops'); | |
resolve('tokenId'); | |
}); | |
} | |
const onErrorHandler = { | |
target: "error", |
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
<svg width="x" height="y" | |
viewBox="0 0 imgX imgY" | |
preserveAspectRatio="<align> <meetOrSlice>" | |
aria-labelledby="title" aria-role="img"> | |
<title id="title"> img alt here &ly;/title> | |
<image xlink:href="..." width="100%" height="100%"> | |
</image> | |
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
<!DOCTYPE html> | |
<html lang="zh-Hans"> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<a href="http://www.w3schools.com/TAgs/ref_language_codes.asp">See all the possible languages codes</a> | |
</body> | |
</html> |