Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepared for release 1.3.0, added scripts to build release and copy f…
…iles to obsidian testing vault, updated readme and gitignore
- Loading branch information
Showing
7 changed files
with
204 additions
and
10 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
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,22 @@ | ||
import JSZip from "jszip" | ||
import {readFileSync, unlinkSync, createWriteStream, mkdirSync, existsSync, copyFileSync, readdirSync} from "fs"; | ||
import {join} from "path" | ||
|
||
|
||
if (!existsSync("release")) mkdirSync("release") | ||
|
||
readdirSync("release").forEach( (file) => { | ||
if (file.endsWith(".zip")) unlinkSync(join("release", file)); | ||
}); | ||
|
||
const release_zip = new JSZip(); | ||
|
||
const manifest = readFileSync("manifest.json") | ||
const version = JSON.parse(manifest)["version"] | ||
release_zip.file("obsidian-keyshots/manifest.json",manifest) | ||
release_zip.file("obsidian-keyshots/main.js",readFileSync("main.js")) | ||
|
||
release_zip.generateNodeStream({ type: 'nodebuffer', streamFiles: true }) | ||
.pipe(createWriteStream(`release/obsidian-keyshots-${version}.zip`)); | ||
|
||
["main.js","manifest.json"].forEach(f => copyFileSync(f,`release/${f}`)); |
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,4 @@ | ||
import { existsSync, copyFileSync } from "fs"; | ||
import DEV_TEST_PLUGIN_PATH from "./paths.mjs"; | ||
if (!existsSync(DEV_TEST_PLUGIN_PATH)) { throw new Error("Destination does not exist!"); }; | ||
["main.js","manifest.json"].forEach(f => copyFileSync(f,`${DEV_TEST_PLUGIN_PATH}${f}`)); |
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
Oops, something went wrong.