-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from benrbray/benrbray/gh54/pnpm-attempt-2
migrate from `npm` to `pnpm` monorepo with workspaces
- Loading branch information
Showing
16 changed files
with
12,580 additions
and
9,344 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,19 +105,23 @@ Noteworthy is still a bit rough around the edges, and is missing some basic qual | |
|
||
```bash | ||
git clone [email protected]:benrbray/noteworthy.git | ||
cd noteworthy | ||
pnpm install | ||
pnpm build | ||
cd noteworthy-electron | ||
npm run build:linux | ||
pnpm run build:linux | ||
pnpm run build:win | ||
pnpm run build:mac | ||
``` | ||
|
||
After building, look in the `/dist` folder for an executable. | ||
|
||
## Development | ||
|
||
Noteworthy is built with [`electron-vite`](https://evite.netlify.app/). To run in development mode with live-reload, | ||
Noteworthy is built with [`electron-vite`](https://evite.netlify.app/), and structured as a monorepo using [`pnpm` workspaces](https://pnpm.io/workspaces). To run in development mode with live-reload, | ||
|
||
```bash | ||
cd noteworthy-electron | ||
npm run dev | ||
pnpm dev:electron | ||
``` | ||
|
||
## Acknowledgements | ||
|
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,27 @@ | ||
{ | ||
"name": "@noteworthy/editor", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"files": ["dist"], | ||
"main": "./dist/noteworthy-editor.umd.cjs", | ||
"module": "./dist/noteworthy-editor.js", | ||
"types": "./dist/noteworthy-editor.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./dist/noteworthy-editor.js", | ||
"require": "./dist/noteworthy-editor.umd.cjs" | ||
} | ||
}, | ||
"scripts": { | ||
"dev": "vite", | ||
"dev:electron": "pnpm run build", | ||
"build": "tsc && vite build", | ||
"preview": "vite preview" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.0.2", | ||
"vite": "^4.3.9", | ||
"vite-plugin-dts": "^2.3.0" | ||
} | ||
} |
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,3 @@ | ||
export function foo() { | ||
console.log(2); | ||
} |
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 @@ | ||
/// <reference types="vite/client" /> |
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,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"useDefineForClassFields": true, | ||
"module": "ESNext", | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
"skipLibCheck": true, | ||
|
||
/* Bundler mode */ | ||
"moduleResolution": "bundler", | ||
"allowImportingTsExtensions": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
|
||
/* Linting */ | ||
"strict": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noFallthroughCasesInSwitch": true | ||
}, | ||
"include": ["src"] | ||
} |
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,33 @@ | ||
import { resolve } from "path"; | ||
import { defineConfig } from "vite"; | ||
import vitePluginDts from 'vite-plugin-dts'; | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
vitePluginDts({ insertTypesEntry: true }) | ||
], | ||
resolve: { | ||
alias: { | ||
"@common" : "src/common", | ||
} | ||
}, | ||
build: { | ||
lib: { | ||
entry: resolve(__dirname, 'src/index.ts'), | ||
name: 'NoteworthyEditor', | ||
fileName: 'noteworthy-editor', | ||
}, | ||
// rollupOptions: { | ||
// // make sure to externalize deps that shouldn't be bundled | ||
// // into your library | ||
// external: ['vue'], | ||
// output: { | ||
// // Provide global variables to use in the UMD build | ||
// // for externalized deps | ||
// globals: { | ||
// vue: 'Vue', | ||
// }, | ||
// }, | ||
// }, | ||
} | ||
}) |
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 @@ | ||
shamefully-hoist=true |
Oops, something went wrong.