mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
move note to top
This commit is contained in:
parent
59101a1f33
commit
a61f17b1f2
2 changed files with 8 additions and 7 deletions
|
@ -8,13 +8,10 @@ const excalidrawPackage = `${excalidrawDir}/package.json`;
|
||||||
const originalReadMe = fs.readFileSync(`${excalidrawDir}/README.md`, "utf8");
|
const originalReadMe = fs.readFileSync(`${excalidrawDir}/README.md`, "utf8");
|
||||||
|
|
||||||
const updateReadme = () => {
|
const updateReadme = () => {
|
||||||
let data = originalReadMe;
|
const excalidrawIndex = originalReadMe.indexOf("### Excalidraw");
|
||||||
|
|
||||||
const noteIndex = data.indexOf("#### Note");
|
|
||||||
const installlationIndex = data.indexOf("### Installation");
|
|
||||||
|
|
||||||
// remove note for stable readme
|
// remove note for stable readme
|
||||||
data = data.slice(0, noteIndex) + data.slice(installlationIndex);
|
const data = originalReadMe.slice(excalidrawIndex);
|
||||||
|
|
||||||
// update readme
|
// update readme
|
||||||
fs.writeFileSync(`${excalidrawDir}/README.md`, data, "utf8");
|
fs.writeFileSync(`${excalidrawDir}/README.md`, data, "utf8");
|
||||||
|
@ -38,8 +35,8 @@ const release = async (nextVersion) => {
|
||||||
);
|
);
|
||||||
// revert readme after release
|
// revert readme after release
|
||||||
fs.writeFileSync(`${excalidrawDir}/README.md`, originalReadMe, "utf8");
|
fs.writeFileSync(`${excalidrawDir}/README.md`, originalReadMe, "utf8");
|
||||||
// /* eslint-disable no-console */
|
|
||||||
// console.log("Done!");
|
console.info("Done!");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#### Note
|
||||||
|
|
||||||
|
⚠️ ⚠️ ⚠️ You are viewing the docs for the **next** release, in case you want to check the docs for the stable release, you can view it [here](https://www.npmjs.com/package/@excalidraw/excalidraw).
|
||||||
|
|
||||||
### Excalidraw
|
### Excalidraw
|
||||||
|
|
||||||
Excalidraw exported as a component to directly embed in your projects.
|
Excalidraw exported as a component to directly embed in your projects.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue