Skip to content

Commit

Permalink
chore: fix inject-version script
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenbroekema committed Nov 28, 2023
1 parent efbfeee commit 3591f50
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/inject-version.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import fs from 'node:fs';

const indexContent = fs.readFileSync('index.js', 'utf-8');
const filePath = 'lib/StyleDictionary.js';
const indexContent = fs.readFileSync(filePath, 'utf-8');
const { version } = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
const newIndexContent = indexContent.replace('<? version placeholder ?>', version);
fs.writeFileSync('index.js', newIndexContent, 'utf-8');
fs.writeFileSync(filePath, newIndexContent, 'utf-8');

0 comments on commit 3591f50

Please sign in to comment.