From 74811c0dd58dada1ae838226ae29af7d6c058437 Mon Sep 17 00:00:00 2001 From: mrjones-plip Date: Fri, 19 Jan 2024 13:08:16 -0800 Subject: [PATCH 1/3] move publish.js to script dir, delete dist dir --- dist/index.js | 18 ------------------ package.json | 2 +- {dist => scripts}/publish.js | 0 3 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 dist/index.js rename {dist => scripts}/publish.js (100%) diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index faba91f9..00000000 --- a/dist/index.js +++ /dev/null @@ -1,18 +0,0 @@ -// thanks https://riptutorial.com/node-js/example/1169/hello-world-http-server ! - -const http = require('http'); // Loads the http module - -http.createServer((request, response) => { - - // 1. Tell the browser everything is OK (Status code 200), and the data is in plain text - response.writeHead(200, { - 'Content-Type': 'text/plain' - }); - - // 2. Write the announced text to the body of the page - response.write('Hello, World!\n'); - - // 3. Tell the server that all of the response headers and body have been sent - response.end(); - -}).listen(3000); // 4. Tells the server what port to be on diff --git a/package.json b/package.json index 4c43d72f..b29d9625 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "build": "npm run cp-package-json && npx tsc", "start": "node dist/index.js", "dev": "tsc-watch --onSuccess \"node dist/index.js\"", - "publish": "node dist/publish.js" + "publish": "node scripts/publish.js" }, "repository": { "type": "git", diff --git a/dist/publish.js b/scripts/publish.js similarity index 100% rename from dist/publish.js rename to scripts/publish.js From e25b4d8f618ebe9c63152076f1a9ef7ffe781f9f Mon Sep 17 00:00:00 2001 From: mrjones-plip Date: Fri, 19 Jan 2024 13:14:49 -0800 Subject: [PATCH 2/3] point package.json at correct index file for start call --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b29d9625..fc4ff589 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "cp-package-json": "cp package.json ./src", "test": "npx ts-mocha test/{,**}/*.spec.ts", "build": "npm run cp-package-json && npx tsc", - "start": "node dist/index.js", + "start": "node src/index.ts", "dev": "tsc-watch --onSuccess \"node dist/index.js\"", "publish": "node scripts/publish.js" }, From be20886803b0a8c2b34cee810ff5d042b1b33642 Mon Sep 17 00:00:00 2001 From: Ashley <8253488+mrjones-plip@users.noreply.github.com> Date: Mon, 22 Jan 2024 12:37:46 -0800 Subject: [PATCH 3/3] Update package.json Co-authored-by: Kenn Sippell --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc4ff589..b29d9625 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "cp-package-json": "cp package.json ./src", "test": "npx ts-mocha test/{,**}/*.spec.ts", "build": "npm run cp-package-json && npx tsc", - "start": "node src/index.ts", + "start": "node dist/index.js", "dev": "tsc-watch --onSuccess \"node dist/index.js\"", "publish": "node scripts/publish.js" },