editor: make build scripts compatible with windows

This commit is contained in:
Abdullah Atta
2023-01-11 12:30:44 +05:00
parent b7bce0d8cd
commit 165862db06
3 changed files with 8 additions and 4 deletions

View File

@@ -67,8 +67,10 @@
"react-dom": ">=17.0.0"
},
"scripts": {
"build": "zx ./scripts/build.mjs",
"watch": "zx ./scripts/build.mjs --watch",
"prebuild": "zx ./scripts/build.mjs",
"prewatch": "zx ./scripts/build.mjs",
"build": "tsc",
"watch": "tsc --watch",
"prepub": "npm run build",
"pub": "np",
"postinstall": "npx patch-package"

View File

@@ -44,5 +44,3 @@ fs.writeFileSync(
path.join(ROOT_DIR, "src", "extensions", "code-block", "languages.json"),
JSON.stringify(languagesList)
);
await $`cd ${ROOT_DIR} && npx tsc ${process.argv.slice(3)}`;

View File

@@ -20,6 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { EditorState } from "prosemirror-state";
import { NodeType } from "prosemirror-model";
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
// backspace directly to an empty list item above, or outdent this node