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 rand = (min, max) => min + Math.floor(Math.random() * max); | |
class Dots { | |
static get inputProperties() { | |
return [ | |
'--bg-color', | |
'--dot-color', | |
'--mouse-x', | |
'--mouse-y', | |
]; |
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
/** | |
* Run in the console to inline all code block styles before | |
* copy + pasting into ConvertKit in HTML mode | |
*/ | |
const CSS_PROPERTIES = [ | |
'background-color', | |
'font-size', | |
'color', | |
]; |
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
#!/usr/bin/env node | |
// Script that consumers of CY can run to obtain stats on | |
// how they are using CY components in their project. | |
const glob = require('glob'); | |
const fs = require('fs'); | |
// List of components re-generated on every build | |
const { components } = require('./components.json'); |
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
/** | |
* Making promises | |
*/ | |
let okPromise = Js.Promise.make((~resolve, ~reject as _) => [@bs] resolve("ok")); | |
/* Simpler promise creation for static values */ | |
Js.Promise.resolve("easy"); | |
Js.Promise.reject(Invalid_argument("too easy")); |