1
0
Эх сурвалжийг харах

feat: add test script as submodule

Sven 1 жил өмнө
parent
commit
56dcdadcbe
4 өөрчлөгдсөн 15 нэмэгдсэн , 1 устгасан
  1. 3 0
      .gitmodules
  2. 2 1
      package.json
  3. 9 0
      test/README.md
  4. 1 0
      test/TestScript

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "test/TestScript"]
+	path = test/TestScript
+	url = https://github.com/Sv443-Network/UserUtils-Test.git

+ 2 - 1
package.json

@@ -15,7 +15,8 @@
     "dev": "npm run build-common -- --sourcemap --watch --onSuccess \"npm run build-types && echo Finished building.\"",
     "publish-package": "changeset publish",
     "node-ts": "node --no-warnings=ExperimentalWarning --enable-source-maps --loader ts-node/esm",
-    "test": "npm run node-ts -- ./test/server.mts"
+    "test-serve": "npm run node-ts -- ./test/server.mts",
+    "test-dev": "cd test/TestScript && npm run dev"
   },
   "repository": {
     "type": "git",

+ 9 - 0
test/README.md

@@ -0,0 +1,9 @@
+### Setup
+1. Link main project with `npm link`
+2. Run `npm run dev` to watch and recompile the main project
+3. Run `npm run test-serve` to start the test page webserver
+4. Checkout submodules
+5. Go to test userscript with `cd test/TestScript`
+6. Install deps with `npm i`
+7. Link with `npm link @sv443-network/userutils`
+8. Watch and recompile test userscript with `npm run dev` (or `npm run test-dev` when in the main project root)

+ 1 - 0
test/TestScript

@@ -0,0 +1 @@
+Subproject commit 423e38c925d512b72ddf8b68ab0aac664a6e5e7c