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
const sendCode = (email) => { | |
let serverError = Math.random() < 0.25 | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
if (serverError) { | |
reject({ code: 3 }) | |
} | |
if (email === '[email protected]') { |
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
const sendCode = (email, first, last) => { | |
let error = Math.random() < 0.25 | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
if (error) { | |
reject({ code: 3 }) | |
} | |
if (email === '[email protected]') { |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
{ | |
"component": { | |
"prefix": "component", | |
"body": [ | |
"<template>", | |
"\t<div>${9}</div>", | |
"<\/template>", | |
"", | |
"<script>", | |
"export default {", |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
{ | |
"module-templates.engine": "handlebars", | |
"module-templates.templates": [ | |
{ | |
"displayName": "Chalk UI component", | |
"defaultPath": "src/components", | |
"folder": "{{kebab name}}", | |
"questions": { | |
"name": "Component name" | |
}, |
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
{ | |
"module-templates.engine": "handlebars", | |
"module-templates.templates": [ | |
{ | |
"displayName": "OMS component", | |
"defaultPath": "src/components", | |
"folder": "{{kebab name}}", | |
"questions": { | |
"name": "Component name" | |
}, |
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
RED="31" | |
GREEN="32" | |
CYAN="36" | |
WHITE="97" | |
BOLDGREEN="\e[1;${GREEN}m" | |
BOLDCYAN="\e[1;${CYAN}m" | |
BOLDWHITE="\e[1;${WHITE}m" | |
ENDCOLOR="\e[0m" | |
function select_option { |