From 2c81f9f95153e10f61917896be8338dddef3bfc4 Mon Sep 17 00:00:00 2001 From: Dom Date: Mon, 19 Aug 2024 23:30:52 +0200 Subject: [PATCH] copy LCN files on build --- zotero-plugin.config.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/zotero-plugin.config.ts b/zotero-plugin.config.ts index 776f25d..6db00b5 100644 --- a/zotero-plugin.config.ts +++ b/zotero-plugin.config.ts @@ -1,7 +1,6 @@ import { defineConfig } from "zotero-plugin-scaffold"; import pkg from "./package.json"; -import { copyFileSync, readdirSync, renameSync } from "fs"; -import path from "path"; +import { copyFileSync, readdirSync, renameSync, mkdirSync } from "fs"; import fse from "fs-extra"; import { replaceInFileSync } from "zotero-plugin-scaffold/tools"; @@ -96,6 +95,17 @@ export default defineConfig({ from: /wikicite_prefs_citation-storage-(note|extra)=/g, to: "$&\n .label=", }); + + // Copy local citations network + mkdirSync("build/addon/chrome/content/Local-Citation-Network/"); + copyFileSync( + "Local-Citation-Network/index.js", + "build/addon/chrome/content/Local-Citation-Network/index.js", + ); + copyFileSync( + "Local-Citation-Network/index.html", + "build/addon/chrome/content/Local-Citation-Network/index.html", + ); }, }, // If you want to checkout update.json into the repository, uncomment the following lines: