Skip to content

Instantly share code, notes, and snippets.

@themounthead
themounthead / Compile Sass with @imports
Created September 21, 2021 09:23
Use importer lib to compile sass file (with nested imports) into css
node-sass --importer node_modules/node-sass-package-importer/dist/cli.js source/app.sass dest/app.css
eg. node-sass src/app/config/theme/theme.scss sample.css --importer=node_modules/node-sass-package-importer/dist/cli.js
Install the node-sass-package-importer
https://stackoverflow.com/questions/48380971/compile-sass-and-import-from-node-modules
@themounthead
themounthead / machine.js
Last active December 19, 2019 12:21
Generated by XState Viz: https://xstate.js.org/viz
const FRIEND_STATE_TREE = {
initial: 'IDLE',
states: {
IDLE: {
on: {
'ON_LOAD_FRIEND_FEED': 'FRIEND_FEED_WAITING',
},
},
FRIEND_FEED_WAITING: {
entry: 'test',
@themounthead
themounthead / machine.js
Created December 18, 2019 10:45
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions