2024-02-01 22:38:21 +09:00
|
|
|
import fs from 'fs';
|
|
|
|
|
import path from 'path';
|
2023-01-17 08:04:34 +01:00
|
|
|
|
|
|
|
|
import pkg from '../package.json' assert { type: 'json' };
|
|
|
|
|
|
2024-02-01 22:38:21 +09:00
|
|
|
const files = ['dist/source/lucide-solid.js', 'dist/types/lucide-solid.d.ts'];
|
2023-01-17 08:04:34 +01:00
|
|
|
|
|
|
|
|
files.forEach((file) => {
|
|
|
|
|
const fileContents = fs.readFileSync(path.resolve(file), 'utf-8');
|
2024-02-01 22:38:21 +09:00
|
|
|
const newFileContents = fileContents.replace('{{version}}', pkg.version);
|
2023-01-17 08:04:34 +01:00
|
|
|
|
2024-02-01 22:38:21 +09:00
|
|
|
fs.writeFileSync(path.resolve(file), newFileContents, 'utf-8');
|
|
|
|
|
});
|