Skip to content

Commit

Permalink
differentiate extension and view tsconfigs
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoflop committed Mar 6, 2022
1 parent 5217592 commit 3fceb16
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@
]
},
"scripts": {
"watch": "npx tsc ./src/extension.ts --outDir ./dist/ --skipLibCheck --watch --inlineSourceMap",
"watch": "npx tsc --watch --project ./tsconfig.extension.json",
"tsc-build": "npx tsc ./src/extension.ts --outDir ./dist/ --skipLibCheck",
"start": "node ./dist/index.js",
"vscode:prepublish": "npm run tsc-build",
"react-bundle": "esbuild ./src/remix-view/index.tsx --bundle --loader:.png=file --outdir=./dist/remix-view --sourcemap=inline --watch",
"react-bundle": "esbuild ./src/remix-view/index.tsx --bundle --outdir=./dist/remix-view --sourcemap=inline --watch --tsconfig=./tsconfig.remixview.json",
"css": "tailwindcss -i ./src/remix-view/index.css -o ./dist/remix-view/index.css --watch",
"dev": "concurrently 'npm:watch' 'npm:css' 'npm:react-bundle'"
},
Expand Down
23 changes: 23 additions & 0 deletions tsconfig.extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": "./tsconfig",
"exclude": [
"src/remix-view",
"src/assets"
],
"watchOptions": {
"excludeDirectories": [
"src/remix-view",
"src/assets"
],
},
"files": [
"src/extension.ts"
],
"compilerOptions": {
"module": "CommonJS",
"outDir": "./dist/",
"lib": [
"ESNext"
]
}
}
18 changes: 6 additions & 12 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
{
"include": [
"src",
"types"
],
"compilerOptions": {
"module": "ES2022",
"target": "ES6",
"lib": [
"ESNext",
"DOM"
],
"target": "ES2020",
"moduleResolution": "node",
"jsx": "preserve",
"baseUrl": "./",
/* paths - import rewriting/resolving */
"paths": {
// "https://cdn.skypack.dev/three": ["node_modules/@types/three"]
},
"noEmit": true,
/* Additional Options */
"strict": true,
"skipLibCheck": true,
"inlineSourceMap": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
Expand Down
15 changes: 15 additions & 0 deletions tsconfig.remixview.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "./tsconfig",
"watchOptions": {
"excludeDirectories": [
"src/assets"
],
},
"files": [
"src/remix-view/index.tsx"
],
"compilerOptions": {
"module": "ES2020",
"outDir": "./dist/remix-view/"
}
}

0 comments on commit 3fceb16

Please sign in to comment.