chore: bump release

This commit is contained in:
quorafind 2025-08-09 13:28:11 +08:00
parent a3614e88fc
commit 1695737fd0
7 changed files with 84 additions and 24 deletions

View file

@ -1,9 +1,8 @@
module.exports = {
hooks: {
"before:init": ["pnpm run build"],
"before:init": ["node esbuild.config.mjs production"],
"after:bump": [
"pnpm run build",
"node -e \"const fs=require('fs'); if(!fs.existsSync('dist')) fs.mkdirSync('dist'); ['main.js','manifest.json','styles.css'].forEach(f=>fs.copyFileSync(f,'dist/'+f))\"",
"node esbuild.config.mjs production",
"node ./scripts/zip.mjs",
"git add .",
],

4
dist/manifest.json vendored
View file

@ -1,10 +1,10 @@
{
"id": "obsidian-task-progress-bar",
"name": "Task Genius",
"version": "9.3.0",
"version": "9.2.2",
"minAppVersion": "0.15.2",
"description": "Comprehensive task management that includes progress bars, task status cycling, and advanced task tracking features.",
"author": "Boninall",
"authorUrl": "https://github.com/Quorafind",
"isDesktopOnly": false
}
}

View file

@ -55,6 +55,68 @@ const renamePlugin = {
};
const prod = process.argv[2] === "production";
const outDir = prod ? "dist" : ".";
// Ensure dist directory exists in production mode
if (prod && !fs.existsSync("dist")) {
fs.mkdirSync("dist", { recursive: true });
}
// Update plugins to handle output directory
const renamePluginWithDir = {
name: "rename-styles",
setup(build) {
build.onEnd(() => {
const { outfile } = build.initialOptions;
const outcss = outfile.replace(/\.js$/, ".css");
const fixcss = outfile.replace(/main\.js$/, "styles.css");
if (fs.existsSync(outcss)) {
console.log("Renaming", outcss, "to", fixcss);
fs.renameSync(outcss, fixcss);
}
});
},
};
// Update CSS settings plugin to handle output directory
const cssSettingsPluginWithDir = {
name: "css-settings-plugin",
setup(build) {
build.onEnd(async (result) => {
// Path to the output CSS file
const cssOutfile = path.join(outDir, "styles.css");
// The settings comment to prepend
const settingsComment =
fs.readFileSync("src/styles/index.css", "utf8").split("*/")[0] +
"*/\n\n";
if (fs.existsSync(cssOutfile)) {
// Read the current content
const cssContent = fs.readFileSync(cssOutfile, "utf8");
// Check if the settings comment is already there
if (!cssContent.includes("/* @settings")) {
// Prepend the settings comment
fs.writeFileSync(cssOutfile, settingsComment + cssContent);
}
}
});
},
};
// Copy manifest to output directory in production
const copyManifestPlugin = {
name: "copy-manifest",
setup(build) {
build.onEnd(() => {
if (prod) {
fs.copyFileSync("manifest.json", path.join(outDir, "manifest.json"));
console.log("Copied manifest.json to", outDir);
}
});
},
};
esbuild
.build({
@ -65,9 +127,9 @@ esbuild
entryPoints: ["src/index.ts"],
plugins: [
inlineWorkerPlugin({ workerName: "Task Genius Indexer" }),
renamePlugin,
cssSettingsPlugin,
renamePluginWithDir,
cssSettingsPluginWithDir,
copyManifestPlugin,
],
bundle: true,
external: [
@ -107,7 +169,7 @@ esbuild
logLevel: "info",
sourcemap: prod ? false : "inline",
treeShaking: true,
outfile: "main.js",
outfile: path.join(outDir, "main.js"),
pure: prod ? ["console.log"] : [],
})
.catch(() => process.exit(1));

View file

@ -1,10 +1,10 @@
{
"id": "obsidian-task-progress-bar",
"name": "Task Genius",
"version": "9.3.0",
"minAppVersion": "0.15.2",
"description": "Comprehensive task management that includes progress bars, task status cycling, and advanced task tracking features.",
"author": "Boninall",
"authorUrl": "https://github.com/Quorafind",
"isDesktopOnly": false
}
"id": "obsidian-task-progress-bar",
"name": "Task Genius",
"version": "9.2.2",
"minAppVersion": "0.15.2",
"description": "Comprehensive task management that includes progress bars, task status cycling, and advanced task tracking features.",
"author": "Boninall",
"authorUrl": "https://github.com/Quorafind",
"isDesktopOnly": false
}

View file

@ -1,10 +1,10 @@
{
"id": "obsidian-task-progress-bar",
"name": "Task Genius",
"version": "9.3.0",
"version": "9.2.2",
"minAppVersion": "0.15.2",
"description": "Comprehensive task management that includes progress bars, task status cycling, and advanced task tracking features.",
"author": "Boninall",
"authorUrl": "https://github.com/Quorafind",
"isDesktopOnly": false
}
}

View file

@ -1,6 +1,6 @@
{
"name": "task-genius",
"version": "9.3.0",
"version": "9.2.2",
"description": "Comprehensive task management plugin for Obsidian with progress bars, task status cycling, and advanced task tracking features.",
"main": "main.js",
"scripts": {

View file

@ -103,6 +103,5 @@
"9.1.5": "0.15.2",
"9.2.0": "0.15.2",
"9.2.1": "0.15.2",
"9.2.2": "0.15.2",
"9.3.0": "0.15.2"
}
"9.2.2": "0.15.2"
}