Skip to content

Instantly share code, notes, and snippets.

@dbanksdesign
Last active March 12, 2021 17:31
Show Gist options
  • Save dbanksdesign/0fdd18e27b54d892fbd0df467f48ea91 to your computer and use it in GitHub Desktop.
Save dbanksdesign/0fdd18e27b54d892fbd0df467f48ea91 to your computer and use it in GitHub Desktop.
// tokens/font.js
module.exports = {
font: {
heading: {
body: {
size: { value: 16 },
type: { value: 'Arial' },
weight: { value: 'bold' }
}
}
}
}
// tokens/hero.js
const {font} = require('./font');
module.exports = {
hero: {
bar: font.heading.body
}
}
module.exports = {
source: ['tokens/**/*'],
platforms: {
css: {
transformGroup: 'css',
files: [{
destination: 'build/variables.css',
format: 'css/variables'
}]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment