mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-20 21:49:32 +01:00
editor: make build scripts compatible with windows
This commit is contained in:
@@ -67,8 +67,10 @@
|
|||||||
"react-dom": ">=17.0.0"
|
"react-dom": ">=17.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "zx ./scripts/build.mjs",
|
"prebuild": "zx ./scripts/build.mjs",
|
||||||
"watch": "zx ./scripts/build.mjs --watch",
|
"prewatch": "zx ./scripts/build.mjs",
|
||||||
|
"build": "tsc",
|
||||||
|
"watch": "tsc --watch",
|
||||||
"prepub": "npm run build",
|
"prepub": "npm run build",
|
||||||
"pub": "np",
|
"pub": "np",
|
||||||
"postinstall": "npx patch-package"
|
"postinstall": "npx patch-package"
|
||||||
|
|||||||
@@ -44,5 +44,3 @@ fs.writeFileSync(
|
|||||||
path.join(ROOT_DIR, "src", "extensions", "code-block", "languages.json"),
|
path.join(ROOT_DIR, "src", "extensions", "code-block", "languages.json"),
|
||||||
JSON.stringify(languagesList)
|
JSON.stringify(languagesList)
|
||||||
);
|
);
|
||||||
|
|
||||||
await $`cd ${ROOT_DIR} && npx tsc ${process.argv.slice(3)}`;
|
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
import { EditorState } from "prosemirror-state";
|
import { EditorState } from "prosemirror-state";
|
||||||
import { NodeType } from "prosemirror-model";
|
import { NodeType } from "prosemirror-model";
|
||||||
import { Editor } from "@tiptap/core";
|
import { Editor } from "@tiptap/core";
|
||||||
|
import {
|
||||||
|
findParentNodeOfType,
|
||||||
|
hasParentNodeOfType
|
||||||
|
} from "../../utils/prosemirror";
|
||||||
|
|
||||||
// WORKAROUND: if we're at the start of a list item, we need to either
|
// WORKAROUND: if we're at the start of a list item, we need to either
|
||||||
// backspace directly to an empty list item above, or outdent this node
|
// backspace directly to an empty list item above, or outdent this node
|
||||||
|
|||||||
Reference in New Issue
Block a user