Skip to content

Commit 918bbba

Browse files
committed
fix(): fix ts config and package.json
1 parent c441153 commit 918bbba

File tree

3 files changed

+31
-12
lines changed

3 files changed

+31
-12
lines changed

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@
251251
<button class="btn btn-primary" id="basic_submit-btn">Submit</button>
252252
</div>
253253
</form>
254-
<script type="module" src="./src/main.ts"></script>
255254
<script type="module" src="./src/example.ts"></script>
256255
</body>
257256
</html>

package.json

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,23 @@
66
"lint-md": "remark .",
77
"semantic-release": "semantic-release",
88
"dev": "vite --port 3001",
9-
"build": "tsc && vite build",
9+
"build:vite": "tsc && vite build",
10+
"build:types": "tsc --project tsconfig.types.json",
11+
"build": "yarn run build:vite && yarn run build:types",
1012
"lint": "eslint . --ext .ts",
1113
"test": "jest",
1214
"test:coverage": "jest --coverage",
1315
"upgrade-packages": "ncu --configFileName .ncurc.json"
1416
},
17+
"main": "./dist/just-validate.production.min.js",
18+
"module": "./dist/just-validate.es.js",
19+
"exports": {
20+
".": {
21+
"import": "./dist/just-validate.es.js",
22+
"require": "./dist/just-validate.production.min.js"
23+
}
24+
},
25+
"types": "./dist/main.d.ts",
1526
"remarkConfig": {
1627
"plugins": [
1728
"remark-preset-lint-recommended"
@@ -32,16 +43,10 @@
3243
"bugs": {
3344
"url": "https://github.com/horprogs/Just-validate/issues"
3445
},
35-
"unpkg": "./dist/just-validate.umd.js",
36-
"files": ["dist"],
37-
"main": "./dist/just-validate.umd.js",
38-
"module": "./dist/just-validate.es.js",
39-
"exports": {
40-
".": {
41-
"import": "./dist/just-validate.es.js",
42-
"require": "./dist/just-validate.umd.js"
43-
}
44-
},
46+
"unpkg": "./dist/just-validate.production.min.js",
47+
"files": [
48+
"dist"
49+
],
4550
"homepage": "https://github.com/horprogs/Just-validate#readme",
4651
"devDependencies": {
4752
"@babel/core": "7.16.0",

tsconfig.types.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": "./tsconfig",
3+
"compilerOptions": {
4+
"outDir": "dist",
5+
"declaration": true,
6+
"isolatedModules": false,
7+
"strict": false,
8+
"noEmit": false,
9+
"emitDeclarationOnly": true
10+
},
11+
"exclude": [
12+
"src/example.ts",
13+
"src/tests"
14+
]
15+
}

0 commit comments

Comments
 (0)