Skip to content

Commit

Permalink
add two tsconfig for not creating tests in published version
Browse files Browse the repository at this point in the history
  • Loading branch information
pshaddel committed May 28, 2024
1 parent 27a3bc3 commit 9e9e2ce
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@
],
"icon": "icon.png",
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"vscode:prepublish": "tsc -p ./tsconfig.publish.json",
"compile": "tsc -p ./tsconfig.json",
"watch": "tsc -watch -p ./tsconfig.json",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
},
"exclude": ["src/test/**/*.ts", "node_modules"],
}
}
18 changes: 18 additions & 0 deletions tsconfig.publish.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "ES2020",
"outDir": "out",
"lib": [
"ES2020"
],
"sourceMap": true,
"rootDir": "src",
"strict": true /* enable all strict type-checking options */
/* Additional Checks */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
},
"exclude": ["src/test/**/*.ts", "node_modules"],
}

0 comments on commit 9e9e2ce

Please sign in to comment.