Skip to content

Commit

Permalink
fix: use built-in
Browse files Browse the repository at this point in the history
  • Loading branch information
Niznikr committed Jan 29, 2025
1 parent ef3ff80 commit 12288f0
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions packages/tokens/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ const sd = new StyleDictionary({
{
format: 'javascript/esm',
destination: 'index.es.js',
options: {
minify: true,
},
},
{
format: 'typescript/accurate-module-declarations',
Expand Down Expand Up @@ -276,18 +279,6 @@ StyleDictionary.registerFormat({
},
});

StyleDictionary.registerFormat({
name: 'javascript/esm',
format: async ({ dictionary, file, options }) => {
const header = await fileHeader({ file });
return `${header}export default ${JSON.stringify(
minifyDictionary(dictionary.tokens, options.usesDtcg),
null,
2,
)};\n`;
},
});

StyleDictionary.registerFormat({
name: 'javascript/commonJs',
format: async ({ dictionary, file, options }) => {
Expand Down

0 comments on commit 12288f0

Please sign in to comment.