Created
February 14, 2018 06:02
-
-
Save dbanksdesign/17f7a5c9b4130907082684a9190d0deb to your computer and use it in GitHub Desktop.
Style Dictionary Demo Watcher
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 StyleDictionary = require('style-dictionary'); | |
const watch = require('node-watch'); | |
watch('./', { recursive: true, filter: /^(properties|components)/ }, function(evt, name) { | |
console.log('Updating the style dictionary'); | |
try { | |
styleDictionary = StyleDictionary.extend('config.json'); | |
styleDictionary.buildAllPlatforms(); | |
console.log('\n🎉 Style dictionary finished!'); | |
} catch (e) { | |
console.log(e); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment