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
import {createSDTFEngine} from '@specifyapp/specify-design-token-format'; | |
/** | |
* CREATE A GRAPH FROM SCRATCH | |
*/ | |
const sdtfTokenTree = createSDTFEngine({}) | |
// create two colors | |
sdtfTokenTree.mutation.addToken({ |
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
async function parse(tokens, { SVGO, SVGSpriter }) { | |
const svgo = new SVGO({ | |
plugins: [{ | |
cleanupAttrs: true | |
}, { | |
removeDoctype: true | |
}, { | |
removeXMLProcInst: true | |
}, { | |
removeComments: true |
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
async function parse(tokens, { SVGO }) { | |
const svgo = new SVGO({ | |
plugins: [{ | |
cleanupAttrs: true | |
}, { | |
removeDoctype: true | |
}, { | |
removeXMLProcInst: true | |
}, { | |
removeComments: true |
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
function parse(tokens) { | |
const numberOfVariation = 9; | |
const result = tokens.filter(token => token.name !== null).map((token) => { | |
const output = []; | |
const color = tinycolor(token.value).toRgb(); | |
let tintNumber = (numberOfVariation - 1) / 2; | |
if (tintNumber) tintNumber = Math.ceil(tintNumber); | |
let shadeNumber = (numberOfVariation - 1) / 2; | |
if (shadeNumber) shadeNumber = Math.floor(shadeNumber); | |
const tintGap = 500 / (tintNumber + 1); |
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
get_git_status() { | |
if [ -d ".git" ]; then; | |
upstream=`git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)` | |
if [ -z "$upstream" ]; then; | |
echo "%{$fg_bold[red]%}(No upstream)%{$reset_color%} " | |
else | |
count=`git log --oneline @{u}.. | wc -l | awk '{ print $1 }'` | |
if [ $count -gt 0 ]; then | |
echo "%{$fg_bold[red]%}($count)%{$reset_color%} " |