mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 03:37:55 +01:00
chore: setup lerna, nx & prettier
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
build
|
||||
coverage
|
||||
node_modules
|
||||
dist
|
||||
6
.prettierignore
Normal file
6
.prettierignore
Normal file
@@ -0,0 +1,6 @@
|
||||
build
|
||||
coverage
|
||||
node_modules
|
||||
dist
|
||||
native/
|
||||
public/an.js
|
||||
8
.prettierrc.js
Normal file
8
.prettierrc.js
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
trailingComma: "none",
|
||||
singleQuote: false,
|
||||
semi: true,
|
||||
printWidth: 80,
|
||||
useTabs: false,
|
||||
tabWidth: 2
|
||||
};
|
||||
1979
apps/web/package-lock.json
generated
1979
apps/web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "notesnook",
|
||||
"name": "@notesnook/web",
|
||||
"description": "Your private note taking space",
|
||||
"version": "2.1.6",
|
||||
"private": true,
|
||||
@@ -13,10 +13,10 @@
|
||||
"@dnd-kit/sortable": "^7.0.1",
|
||||
"@mdi/js": "^6.5.95",
|
||||
"@mdi/react": "^1.4.0",
|
||||
"@notesnook/crypto": "^1.0.0",
|
||||
"@notesnook/crypto": "*",
|
||||
"@notesnook/desktop": "file:desktop",
|
||||
"@rebass/forms": "^4.0.6",
|
||||
"@streetwriters/editor": "^1.3.1",
|
||||
"@streetwriters/editor": "*",
|
||||
"@streetwriters/notesnook-core": "^7.3.6",
|
||||
"@streetwriters/theme": "^1.0.1",
|
||||
"allotment": "^1.12.1",
|
||||
@@ -35,7 +35,7 @@
|
||||
"localforage": "^1.10.0",
|
||||
"localforage-driver-memory": "^1.0.5",
|
||||
"localforage-getitems": "https://github.com/thecodrr/localForage-getItems.git",
|
||||
"@notesnook/crypto-worker": "file:../../packages/crypto-worker",
|
||||
"@notesnook/crypto-worker": "*",
|
||||
"phone": "^3.1.14",
|
||||
"platform": "^1.3.6",
|
||||
"print-js": "^1.6.0",
|
||||
@@ -54,7 +54,7 @@
|
||||
"react-virtuoso": "^2.4.0",
|
||||
"rebass": "^4.0.7",
|
||||
"showdown": "github:thecodrr/showdown",
|
||||
"@notesnook/streamable-fs": "file:../../packages/streamable-fs",
|
||||
"@notesnook/streamable-fs": "*",
|
||||
"timeago.js": "^4.0.2",
|
||||
"web-streams-polyfill": "^3.1.1",
|
||||
"wouter": "^2.7.3",
|
||||
@@ -136,5 +136,14 @@
|
||||
},
|
||||
"volta": {
|
||||
"node": "16.15.1"
|
||||
},
|
||||
"nx": {
|
||||
"targets": {
|
||||
"build": {
|
||||
"outputs": [
|
||||
"{projectRoot}/build"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import "@streetwriters/editor/styles/styles.css";
|
||||
import "@streetwriters/editor/styles/katex.min.css";
|
||||
import "@streetwriters/editor/styles/katexfonts.css";
|
||||
import "@streetwriters/editor/styles/katex-fonts.css";
|
||||
import "@streetwriters/editor/styles/fonts.css";
|
||||
import "@streetwriters/editor/styles/prism-theme.css";
|
||||
import { Theme } from "@streetwriters/theme";
|
||||
|
||||
7
lerna.json
Normal file
7
lerna.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||
"useNx": true,
|
||||
"useWorkspaces": false,
|
||||
"version": "independent",
|
||||
"packages": ["packages/*", "apps/web"]
|
||||
}
|
||||
18
nx.json
Normal file
18
nx.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"runner": "nx/tasks-runners/default",
|
||||
"options": {
|
||||
"cacheableOperations": ["build", "start"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"targetDefaults": {
|
||||
"build": {
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"start": {
|
||||
"dependsOn": ["^build"]
|
||||
}
|
||||
}
|
||||
}
|
||||
12643
package-lock.json
generated
Normal file
12643
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
package.json
Normal file
14
package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "notesnook",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"bootstrap": "lerna bootstrap",
|
||||
"build": "nx run-many --target=build --all",
|
||||
"start:web": "nx start @notesnook/web"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lerna": "^5.4.0",
|
||||
"nx": "^14.5.4",
|
||||
"prettier": "^2.7.1"
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@notesnook/crypto": "^1.0.0",
|
||||
"@notesnook/crypto": "*",
|
||||
"comlink": "^4.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
1
packages/editor/package-lock.json
generated
1
packages/editor/package-lock.json
generated
@@ -7,7 +7,6 @@
|
||||
"": {
|
||||
"name": "@streetwriters/editor",
|
||||
"version": "1.3.1",
|
||||
"hasInstallScript": true,
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@_ueberdosis/prosemirror-tables": "^1.1.3",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@streetwriters/editor",
|
||||
"version": "1.3.1",
|
||||
"main": "dist/es/index.js",
|
||||
"main": "dist/index.js",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -75,7 +75,7 @@
|
||||
"scripts": {
|
||||
"build": "./scripts/build.sh",
|
||||
"watch": "./scripts/build.sh --watch",
|
||||
"prepub": "./scripts/compile.sh",
|
||||
"prepub": "npm run build",
|
||||
"pub": "np",
|
||||
"postinstall": "npx patch-package"
|
||||
},
|
||||
|
||||
@@ -3,4 +3,4 @@ cp -r ./node_modules/katex/dist/fonts/ $(realpath ./styles/)
|
||||
cp ./node_modules/prism-themes/themes/prism-dracula.min.css $(realpath ./styles/)/prism-theme.css
|
||||
cp ./node_modules/prism-themes/themes/prism-dracula.min.css $(realpath ./styles/)/prism-theme.css
|
||||
|
||||
yarn tsc --watch
|
||||
yarn tsc $@
|
||||
@@ -1,21 +0,0 @@
|
||||
rm -rf dist/
|
||||
|
||||
cp ./node_modules/katex/dist/katex.min.css $(realpath ./styles/)
|
||||
cp -r ./node_modules/katex/dist/fonts/ $(realpath ./styles/)
|
||||
cp ./node_modules/prism-themes/themes/prism-dracula.min.css $(realpath ./styles/)/prism-theme.css
|
||||
cp ./node_modules/prism-themes/themes/prism-dracula.min.css $(realpath ./styles/)/prism-theme.css
|
||||
|
||||
yarn tsc --module commonjs --outDir ./dist/cjs --target es2015
|
||||
yarn tsc --module esnext --outDir ./dist/es --target es6
|
||||
|
||||
cat >dist/cjs/package.json <<!EOF
|
||||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
!EOF
|
||||
|
||||
# cat >dist/es/package.json <<!EOF
|
||||
# {
|
||||
# "type": "module"
|
||||
# }
|
||||
# !EOF
|
||||
@@ -51,7 +51,7 @@
|
||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
||||
"outDir": "./dist/es" /* Specify an output folder for all emitted files. */,
|
||||
"outDir": "./dist/" /* Specify an output folder for all emitted files. */,
|
||||
// "removeComments": true, /* Disable emitting comments. */
|
||||
// "noEmit": true, /* Disable emitting files from a compilation. */
|
||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@notesnook/crypto": "^1.0.0",
|
||||
"@notesnook/crypto": "*",
|
||||
"localforage": "^1.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user