mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-26 13:21:42 +03:00
Use ESM syntax for compatability key script.
This commit is contained in:
parent
3ef54d6275
commit
5613cbc028
@ -1,4 +1,3 @@
|
||||
export const compatibilityKey = 6;
|
||||
|
||||
// TODO make it more automated to keep this in sync with package.json
|
||||
export const packageVersion = "3.0.0-beta.20";
|
||||
|
@ -1,8 +1,11 @@
|
||||
#!/usr/bin/node
|
||||
|
||||
const fs = require("node:fs");
|
||||
import * as fs from "node:fs";
|
||||
|
||||
const currentCompatibilityKey = 6;
|
||||
const currentPackageVersion = JSON.parse(
|
||||
fs.readFileSync("./package.json")
|
||||
).version;
|
||||
|
||||
fs.writeFileSync(
|
||||
"src/Pages/Internal/Platform/CompatibilityKey.elm",
|
||||
@ -17,7 +20,9 @@ currentCompatibilityKey =
|
||||
|
||||
fs.writeFileSync(
|
||||
"generator/src/compatibility-key.js",
|
||||
`module.exports = { compatibilityKey: ${currentCompatibilityKey} };
|
||||
`export const compatibilityKey = ${currentCompatibilityKey};
|
||||
|
||||
export const packageVersion = "${currentPackageVersion}";
|
||||
`
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user