mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 01:11:24 +01:00
14 lines
462 B
JavaScript
14 lines
462 B
JavaScript
// this file will replace all the expected.js and expected-bundle.js files with
|
|
// their _actual equivalents. Only use it when you're sure that you haven't
|
|
// broken anything!
|
|
const fs = require("fs");
|
|
const glob = require("glob");
|
|
|
|
glob.sync("samples/*/_actual*", { cwd: __dirname }).forEach(file => {
|
|
const actual = fs.readFileSync(`${__dirname}/${file}`, "utf-8");
|
|
fs.writeFileSync(
|
|
`${__dirname}/${file.replace("_actual", "expected")}`,
|
|
actual
|
|
);
|
|
});
|