From e1c0f6c1a03b7b915545b3201e2fba749d089cc2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 11 Feb 2021 14:48:27 -0500 Subject: [PATCH] Rename zotero-note-editor submodule to note-editor --- .gitmodules | 4 ++-- chrome/content/zotero/bindings/noteeditor.xml | 2 +- chrome/content/zotero/xpcom/editorInstance.js | 4 ++-- note-editor | 1 + scripts/build.js | 2 +- scripts/clean.js | 2 +- .../{zotero-note-editor.js => note-editor.js} | 16 ++++++++-------- zotero-note-editor | 1 - 8 files changed, 16 insertions(+), 16 deletions(-) create mode 160000 note-editor rename scripts/{zotero-note-editor.js => note-editor.js} (70%) delete mode 160000 zotero-note-editor diff --git a/.gitmodules b/.gitmodules index 4aca5c8a9d..e092830108 100644 --- a/.gitmodules +++ b/.gitmodules @@ -37,7 +37,7 @@ path = pdf-worker url = ssh://git@github.com/zotero/pdf-worker.git branch = master -[submodule "zotero-note-editor"] - path = zotero-note-editor +[submodule "note-editor"] + path = note-editor url = ssh://git@github.com/zotero/zotero-note-editor.git branch = master diff --git a/chrome/content/zotero/bindings/noteeditor.xml b/chrome/content/zotero/bindings/noteeditor.xml index ad3cf40368..e09e34d2b6 100644 --- a/chrome/content/zotero/bindings/noteeditor.xml +++ b/chrome/content/zotero/bindings/noteeditor.xml @@ -333,7 +333,7 @@ + frameBorder="0" src="resource://zotero/note-editor/editor.html" type="content"/> diff --git a/chrome/content/zotero/xpcom/editorInstance.js b/chrome/content/zotero/xpcom/editorInstance.js index c8ad194118..b14394faab 100644 --- a/chrome/content/zotero/xpcom/editorInstance.js +++ b/chrome/content/zotero/xpcom/editorInstance.js @@ -23,9 +23,9 @@ ***** END LICENSE BLOCK ***** */ -// When changing this update in `zotero-note-editor` as well. +// When changing this update in `note-editor` as well. // This only filters images that are being imported from a URL. -// In all other cases `zotero-note-editor` should decide what +// In all other cases `note-editor` should decide what // image types can be imported, and if not then // Zotero.Attachments.importEmbeddedImage does. // Additionally, the allready imported images should never be diff --git a/note-editor b/note-editor new file mode 160000 index 0000000000..89c15b7e29 --- /dev/null +++ b/note-editor @@ -0,0 +1 @@ +Subproject commit 89c15b7e29a4f0f8e051260f2fcdbe6f2f1a2e84 diff --git a/scripts/build.js b/scripts/build.js index ee5e3fd922..bce9e73c7a 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -7,7 +7,7 @@ const getSass = require('./sass'); const getSymlinks = require('./symlinks'); const getPDFReader = require('./pdf-reader'); const getPDFWorker = require('./pdf-worker'); -const getZoteroNoteEditor = require('./zotero-note-editor'); +const getZoteroNoteEditor = require('./note-editor'); const { formatDirsForMatcher, getSignatures, writeSignatures, cleanUp, onSuccess, onError} = require('./utils'); const { dirs, symlinkDirs, copyDirs, symlinkFiles, jsFiles, scssFiles, ignoreMask } = require('./config'); diff --git a/scripts/clean.js b/scripts/clean.js index 7ece51d8a9..5840342019 100644 --- a/scripts/clean.js +++ b/scripts/clean.js @@ -19,7 +19,7 @@ if (require.main === module) { await getClean(path.join(ROOT, '.signatures.json')); await getClean(path.join(ROOT, 'pdf-reader/build')); await getClean(path.join(ROOT, 'pdf-worker/build')); - await getClean(path.join(ROOT, 'zotero-note-editor/build')); + await getClean(path.join(ROOT, 'note-editor/build')); } catch (err) { process.exitCode = 1; global.isError = true; diff --git a/scripts/zotero-note-editor.js b/scripts/note-editor.js similarity index 70% rename from scripts/zotero-note-editor.js rename to scripts/note-editor.js index 50c28f852a..5a7351b3ad 100644 --- a/scripts/zotero-note-editor.js +++ b/scripts/note-editor.js @@ -9,14 +9,14 @@ const { buildsURL } = require('./config'); async function getZoteroNoteEditor(signatures) { const t1 = Date.now(); - const { stdout } = await exec('git rev-parse HEAD', { cwd: './zotero-note-editor' }); + const { stdout } = await exec('git rev-parse HEAD', { cwd: './note-editor' }); const hash = stdout.trim(); - if (!('zotero-note-editor' in signatures) || signatures['zotero-note-editor'].hash !== hash) { - const targetDir = 'build/resource/zotero-note-editor/'; + if (!('note-editor' in signatures) || signatures['note-editor'].hash !== hash) { + const targetDir = 'build/resource/note-editor/'; try { const filename = hash + '.zip'; - const tmpDir = 'tmp/builds/zotero-note-editor/'; + const tmpDir = 'tmp/builds/note-editor/'; const url = buildsURL + 'client-note-editor/' + filename; await exec( `mkdir -p ${tmpDir}` @@ -28,16 +28,16 @@ async function getZoteroNoteEditor(signatures) { ); } catch (e) { - await exec('npm ci;npm run build', { cwd: 'zotero-note-editor' }); - await fs.copy('zotero-note-editor/build/zotero', targetDir); + await exec('npm ci;npm run build', { cwd: 'note-editor' }); + await fs.copy('note-editor/build/zotero', targetDir); } - signatures['zotero-note-editor'] = { hash }; + signatures['note-editor'] = { hash }; } const t2 = Date.now(); return { - action: 'zotero-note-editor', + action: 'note-editor', count: 1, totalCount: 1, processingTime: t2 - t1 diff --git a/zotero-note-editor b/zotero-note-editor deleted file mode 160000 index b0df1226fe..0000000000 --- a/zotero-note-editor +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b0df1226fec688b372b06e925a0c7a528a258983