From 68400aba6e1432ff70e50e5e13187fd36e48613b Mon Sep 17 00:00:00 2001 From: Donnie Flood Date: Mon, 24 Jan 2022 12:20:44 -0700 Subject: [PATCH] only use parcel for client compilation/packaging as it doesn't provide types; use tsc for server/framework compilation --- package.json | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 1f827597..2a534389 100644 --- a/package.json +++ b/package.json @@ -7,30 +7,24 @@ "source": "src/client/liveview.ts", "context": "browser", "distDir": "dist/client" - }, - "framework": { - "source": "src/server/index.ts", - "context": "node", - "isLibrary": true, - "distDir": "dist/framework" - }, - "examples": { - "source": "src/examples/index.ts", - "context": "node", - "distDir": "dist/examples" } }, - "main": "dist/framework/index.ts", + "main": "dist/server/index.js", + "types": "dist/server/index.d.ts", "files": [ - "dist/framework/**/*.js" + "dist/server/**/*.js", + "dist/server/**/*.d.ts" ], "scripts": { - "examples": "nodemon -e js -w dist dist/examples/index.js", - "preexamples": "npm run build", - "build": "rm -rf dist; npm run check; parcel build", - "watch": "parcel watch", + "examples": "npm run prepublish; npm run client-build;nodemon -e js -w dist dist/examples/index.js", + "build": "tsc", + "watch": "tsc --watch", + "client-build": "npm run check; parcel build", + "client-watch": "parcel watch", "check": "tsc --noEmit", - "test": "jest --expand" + "clean": "rm -rf dist", + "test": "jest --expand", + "prepublish": "npm run clean; npm run build" }, "keywords": ["liveviewjs","liveview", "phoenix", "typescript", "javascript", "framework"], "author": "Donnie Flood ",