Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Build: Update scripts for release (fixes #475) * Update scripts * Update CI script
- Loading branch information
Showing
5 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const version = "7.3.1"; | ||
const version = "main"; | ||
|
||
export default version; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @fileoverview Script to update lib/version.js to the value in package.json | ||
* @author Nicholas C. Zakas | ||
*/ | ||
|
||
import fs from "fs"; | ||
|
||
/* | ||
* IMPORTANT: This must be run *before* Rollup so the built package will have | ||
* the correct version number exported. | ||
* | ||
* This is necessary because ESM can't import JSON files directly and we want | ||
* this value to be available in the browser as well as in Node.js. | ||
*/ | ||
|
||
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf8")); | ||
fs.writeFileSync("lib/version.js", `const version = "${pkg.version}";\n\nexport default version;\n`); |