Skip to content

Commit

Permalink
chore: move web/packages/ to packages/
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Aug 25, 2022
1 parent 828f46c commit a6a0e99
Show file tree
Hide file tree
Showing 21 changed files with 89 additions and 89 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
106 changes: 55 additions & 51 deletions apps/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"localforage": "^1.10.0",
"localforage-driver-memory": "^1.0.5",
"localforage-getitems": "https://github.com/thecodrr/localForage-getItems.git",
"nncryptoworker": "file:packages/nncryptoworker",
"@notesnook/crypto-worker": "file:../../packages/crypto-worker",
"phone": "^3.1.14",
"platform": "^1.3.6",
"print-js": "^1.6.0",
Expand All @@ -54,7 +54,7 @@
"react-virtuoso": "^2.4.0",
"rebass": "^4.0.7",
"showdown": "github:thecodrr/showdown",
"streamablefs": "file:packages/streamablefs",
"@notesnook/streamable-fs": "file:../../packages/streamable-fs",
"timeago.js": "^4.0.2",
"web-streams-polyfill": "^3.1.1",
"wouter": "^2.7.3",
Expand Down Expand Up @@ -96,7 +96,6 @@
"zx": "^2.0.0"
},
"scripts": {
"preinstall": "./scripts/build-deps.sh",
"start": "env-cmd -e all,dev,web react-scripts start",
"start:desktop": "env-cmd -e all,desktop react-scripts start",
"build": "env-cmd -e all,web react-scripts --max_old_space_size=8092 build",
Expand Down
7 changes: 0 additions & 7 deletions apps/web/scripts/build-deps.sh

This file was deleted.

2 changes: 1 addition & 1 deletion apps/web/src/interfaces/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import localforage from "localforage";
import { xxhash64, createXXHash64 } from "hash-wasm";
import axios from "axios";
import { AppEventManager, AppEvents } from "../common/app-events";
import { StreamableFS } from "streamablefs";
import { StreamableFS } from "@notesnook/streamable-fs";
import { getNNCrypto } from "./nncrypto.stub";
import hosts from "@streetwriters/notesnook-core/utils/constants";
import { sendAttachmentsProgressEvent } from "@streetwriters/notesnook-core/common";
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/interfaces/nncrypto.stub.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { INNCrypto } from "@notesnook/crypto/dist/src/interfaces";
// eslint-disable-next-line import/no-webpack-loader-syntax
import "worker-loader?filename=static/workers/nncrypto.worker.js!nncryptoworker/dist/src/worker.js";
import "worker-loader?filename=static/workers/nncrypto.worker.js!@notesnook/crypto-worker/dist/src/worker.js";

const WORKER_PATH = "/static/workers/nncrypto.worker.js";

async function loadNNCrypto() {
const hasWorker = "Worker" in window || "Worker" in global;
if (hasWorker) {
const { NNCryptoWorker } = await import("nncryptoworker");
const { NNCryptoWorker } = await import("@notesnook/crypto-worker");
return NNCryptoWorker;
} else {
const { NNCrypto } = await import("@notesnook/crypto");
Expand Down
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "nncryptoworker",
"name": "@notesnook/crypto-worker",
"version": "1.0.0",
"description": "",
"main": "./dist/index.js",
Expand All @@ -11,8 +11,7 @@
"license": "ISC",
"dependencies": {
"@notesnook/crypto": "^1.0.0",
"comlink": "^4.3.1",
"streamablefs": "file:../streamablefs"
"comlink": "^4.3.1"
},
"devDependencies": {
"typescript": "^4.4.3"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"target": "es2020" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
"lib": [
"DOM",
"WebWorker"
"WebWorker",
"ES2015"
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
Expand Down
File renamed without changes.
Loading

0 comments on commit a6a0e99

Please sign in to comment.