token-transformer
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -16,3 +16,5 @@ #!/usr/bin/env node | ||
function transform() { | ||
const [input, output, ...sets] = process.argv.slice(2); | ||
const [input, output, rawSets, rawExcludes] = process.argv.slice(2); | ||
const sets = rawSets.split(',') | ||
const excludes = rawExcludes.split(',') | ||
if (!input) { | ||
@@ -33,5 +35,5 @@ process.stdout.write(`ERROR: Specify an input first (e.g. tokens.json)`); | ||
const parsed = JSON.parse(tokens); | ||
const transformed = transformTokens(parsed, sets); | ||
const transformed = transformTokens(parsed, sets, excludes); | ||
writeFile(output, JSON.stringify(transformed, null, 2), () => { | ||
process.stdout.write(`Transformed tokens from ${input} to ${output}, using sets ${sets.join(', ')}`); | ||
process.stdout.write(`Transformed tokens from ${input} to ${output}, using sets ${sets.join(', ')}, excluding ${excludes.join(', ')}`); | ||
}); | ||
@@ -38,0 +40,0 @@ } else { |
{ | ||
"name": "token-transformer", | ||
"version": "0.0.9", | ||
"description": "A utility that transforms tokens from Figma Tokens to a format that is readable by Style Dictionary.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "six7", | ||
"license": "ISC", | ||
"bin": "index.js" | ||
} | ||
"name": "token-transformer", | ||
"version": "0.0.10", | ||
"description": "A utility that transforms tokens from Figma Tokens to a format that is readable by Style Dictionary.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "six7", | ||
"license": "ISC", | ||
"bin": "index.js" | ||
} |
Sorry, the diff of this file is too big to display
144915
5
1205