0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-25 09:09:35 +01:00
svelte/test/parser/update.js
S. Elliott Johnson fd9d61a7b7
chore: TS to JSDoc Conversion (#8569)
---------

Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
2023-05-19 15:59:42 +02:00

11 lines
459 B
JavaScript

// this file will replace all the output.json files with their _actual.json
// equivalents. Only use it when you're sure that you haven't
// broken anything!
import * as fs from 'node:fs';
import glob from 'tiny-glob/sync.js';
glob('samples/*/_actual.json', { cwd: __dirname }).forEach((file) => {
const actual = fs.readFileSync(`${__dirname}/${file}`, 'utf-8');
fs.writeFileSync(`${__dirname}/${file.replace('_actual.json', 'output.json')}`, actual);
});