Skip to content

Commit

Permalink
Strip dist dir from import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
airhorns committed Feb 18, 2021
1 parent 1b0dc57 commit 20bc3d1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ jspm_packages/
.env

# compiled lib
dist
/client
/node

BUILD_SHA

Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "fastify-renderer",
"version": "0.1.0",
"description": "Simple, high performance client side app renderer for Fastify.",
"main": "dist/node/index.js",
"types": "dist/node/index.d.ts",
"main": "node/index.js",
"types": "node/index.d.ts",
"scripts": {
"watch": "run-p watch:*",
"watch:client": "tsc --watch --incremental --project src/client",
"watch:node": "tsc --watch --incremental --project src/node",
"build": "rimraf ./dist && mkdir dist && tsc --incremental --project src/client && tsc --incremental --project src/node",
"build": "rimraf client node && tsc --incremental --project src/client && tsc --incremental --project src/node",
"lint": "eslint \"*/**/*.{js,ts,tsx}\"",
"lint:fix": "prettier --loglevel warn --write \"src/**/*.{ts,tsx}\" && eslint \"*/**/*.{js,ts,tsx}\" --quiet --fix",
"lint:fix": "prettier --loglevel warn --write \"src/**/*.{ts,tsx}\" && eslint \"*/**/*.{ts,tsx}\" --quiet --fix",
"prepublishOnly": "npm run build",
"test": "run-s build test:unit lint",
"test:unit": "jest"
Expand Down Expand Up @@ -86,6 +86,9 @@
"typescript": "^4.1.4"
},
"files": [
"dist"
"client",
"node",
"README.md",
"LICENSE"
]
}
2 changes: 1 addition & 1 deletion src/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.base.json",
"include": ["./", "../../types"],
"compilerOptions": {
"outDir": "../../dist/client",
"outDir": "../../client",
"module": "esnext",
"types": ["react/experimental", "react-dom/experimental"],
"lib": ["ESNext", "DOM"]
Expand Down
2 changes: 1 addition & 1 deletion src/node/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"include": ["./"],
"compilerOptions": {
"target": "ES2019",
"outDir": "../../dist/node",
"outDir": "../../node",
"module": "commonjs",
"lib": ["ESNext"],
"sourceMap": true
Expand Down

0 comments on commit 20bc3d1

Please sign in to comment.