Skip to content

Commit 5c82c64

Browse files
authored
update dependencies & refactor (#63)
* replace IDoc.getMeta() with IMetadataProvider.getMetadata() * extract makeExtensions function * initialize extensions in render.tsx instead of editor-markdown.tsx * allow extensions to define commands; send events when commands updated * sketch of modal popup with commands for show/hide * basic newfile modal * split main ipc handlers into separate files * create MainIpc_WorkspaceHandlers * pass current workspace dir to new file modal * errors * support returning values from commands * new file command * basic new file modal * fix popup position bug ; fix bug where insertTab command takes priority over list indent command * migrate to pnpm (#68) * update type * progress towards pnpm * pnpm workaround * use esm with electron * update prosemirror-math
1 parent 5dab771 commit 5c82c64

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+8337
-10240
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ build/Release
3333

3434
# Dependency directories
3535
node_modules/
36+
.pnpm-store/**
3637
jspm_packages/
3738

3839
# TypeScript v1 declaration files

justfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
clean:
2+
rm -rf node_modules
3+
rm -rf noteworthy-electron/node_modules
4+
rm -rf noteworthy-web/node_modules
5+
6+
cd noteworthy-electron && pnpm run clean
7+
cd noteworthy-electron && pnpm run clean
8+
9+
clean-install: clean
10+
pnpm install
11+
12+
dev:
13+
cd noteworthy-electron && pnpm run dev

noteworthy-electron/.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# workaround for electron-builder's incompatability with pnpm
2+
# https://github.com/electron-userland/electron-builder/issues/6289#issuecomment-1042620422
3+
# https://github.com/pnpm/pnpm/issues/5724#issuecomment-1345780170
4+
node-linker=hoisted

noteworthy-electron/electron.vite.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@ import { resolve } from 'path'
22
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
33
import solid from 'vite-plugin-solid'
44

5+
// configuration for electron-vite
6+
// https://electron-vite.org/config/
57
export default defineConfig({
68
main: {
79
plugins: [externalizeDepsPlugin()],
10+
build: {
11+
lib: {
12+
// compile main as an es module (*.mjs)
13+
entry: "src/main/index.ts",
14+
formats: ["es"]
15+
}
16+
},
817
resolve: {
918
alias: {
1019
"@common" : resolve("src/common"),

0 commit comments

Comments
 (0)