We started out with sass files with something like this (obvious brevity is obvious):
// colors.scss
$green: #37ab2e;
$white: #FFFFFF;
// skin.scss
.bg_green { color: $green; }
.fg_white { color: $white; }| const path = require('path'); | |
| const glob = require('glob'); | |
| // Setup babel so all future `require` calls are run through it | |
| require("babel-register")({ | |
| // Override babel's default behaviour of ignoring all `node_modules` | |
| ignore: false, | |
| only: [ | |
| // Include all js/jsx files in ./src | |
| "./src/**/*", |
| // https://gist.github.com/MoOx/1eb30eac43b2114de73a | |
| const generic = { | |
| title: /<title>.*<\/title>/gi, | |
| desc: /<desc>.*<\/desc>/gi, | |
| comment: /<!--.*-->/gi, | |
| defs: /<defs>.*<\/defs>/gi, | |
| width: / +width="\d+(\.\d+)?(px)?"/gi, | |
| height: / +height="\d+(\.\d+)?(px)?"/gi, | |
| sketchMSShapeGroup: / +sketch:type=\"MSShapeGroup\"/gi, | |
| sketchMSPage: / +sketch:type=\"MSPage\"/gi, |
We started out with sass files with something like this (obvious brevity is obvious):
// colors.scss
$green: #37ab2e;
$white: #FFFFFF;
// skin.scss
.bg_green { color: $green; }
.fg_white { color: $white; }Good news is we're only using lodash/fp, which makes it easier to match function signatures.
| // @flow | |
| import * as React from 'react'; | |
| import * as R from 'ramda'; | |
| const SEPARATOR = '.'; | |
| const spaceToHyphen = R.replace(/\s/g, '-'); | |
| const delimit = (str, add) => | |
| R.compose( | |
| R.join(SEPARATOR), | |
| R.map( |