@bjmhe/viteplus-preset-pack 2.0.0 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -15
- package/dist/index.mjs +2 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +18 -23
- package/tsconfig.json +0 -20
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> inspired by `tsdown-preset-sxzz`
|
|
10
10
|
|
|
11
|
-
A
|
|
11
|
+
A Tsdown preset for creating a TypeScript package.
|
|
12
12
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
@@ -17,20 +17,6 @@ A Vite Plus preset for creating a TypeScript package.
|
|
|
17
17
|
vp add @bjmhe/viteplus-preset-pack
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
## Usage
|
|
21
|
-
|
|
22
|
-
<!-- automd:file src="./examples/vite.config.lib.ts" code lang="ts" -->
|
|
23
|
-
|
|
24
|
-
<!-- ⚠️ (file) ENOENT: no such file or directory, open '/home/runner/work/viteplus-preset-pack/viteplus-preset-pack/examples/vite.config.lib.ts' -->
|
|
25
|
-
|
|
26
|
-
<!-- /automd -->
|
|
27
|
-
|
|
28
|
-
<!-- automd:file src="./examples/vite.config.nodelib.ts" code lang="ts" -->
|
|
29
|
-
|
|
30
|
-
<!-- ⚠️ (file) ENOENT: no such file or directory, open '/home/runner/work/viteplus-preset-pack/viteplus-preset-pack/examples/vite.config.nodelib.ts' -->
|
|
31
|
-
|
|
32
|
-
<!-- /automd -->
|
|
33
|
-
|
|
34
20
|
## Licenses
|
|
35
21
|
|
|
36
22
|
<!-- automd:contributors markupGoLogo anon author="bjmhe" license="MIT" -->
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
/*! Keep it simple, keep it free */
|
|
2
|
-
import * as attw from "@arethetypeswrong/core";
|
|
3
|
-
import * as publint from "publint";
|
|
4
|
-
import * as publintUtils from "publint/utils";
|
|
5
2
|
import ApiSnapshot from "tsnapi/rolldown";
|
|
6
3
|
//#region src/constant.ts
|
|
7
4
|
const PACK_BANNER = "/*! Keep it simple, keep it free */";
|
|
@@ -11,12 +8,7 @@ const PACK_FOOTER = "/*! Built with love & coffee ☕ */";
|
|
|
11
8
|
const packPreset = (options) => {
|
|
12
9
|
const { entry = "index", inlineDeps = [] } = options;
|
|
13
10
|
return {
|
|
14
|
-
attw:
|
|
15
|
-
enabled: false,
|
|
16
|
-
profile: "esm-only",
|
|
17
|
-
module: attw,
|
|
18
|
-
level: "warn"
|
|
19
|
-
},
|
|
11
|
+
attw: false,
|
|
20
12
|
banner: PACK_BANNER,
|
|
21
13
|
deps: { onlyBundle: inlineDeps },
|
|
22
14
|
devtools: true,
|
|
@@ -29,10 +21,7 @@ const packPreset = (options) => {
|
|
|
29
21
|
footer: PACK_FOOTER,
|
|
30
22
|
platform: "neutral",
|
|
31
23
|
plugins: [ApiSnapshot()],
|
|
32
|
-
publint:
|
|
33
|
-
enabled: "ci-only",
|
|
34
|
-
module: [publint, publintUtils]
|
|
35
|
-
},
|
|
24
|
+
publint: "ci-only",
|
|
36
25
|
shims: true,
|
|
37
26
|
sourcemap: true,
|
|
38
27
|
unused: true
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/constant.ts","../src/index.ts"],"sourcesContent":["export const PACK_BANNER = \"/*! Keep it simple, keep it free */\";\nexport const PACK_FOOTER = \"/*! Built with love & coffee ☕ */\";\n","import
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/constant.ts","../src/index.ts"],"sourcesContent":["export const PACK_BANNER = \"/*! Keep it simple, keep it free */\";\nexport const PACK_FOOTER = \"/*! Built with love & coffee ☕ */\";\n","import type { LibOptions } from \"@bjmhe/viteplus-preset\";\nimport ApiSnapshot from \"tsnapi/rolldown\";\nimport type { UserConfig } from \"vite-plus\";\n\nimport { PACK_BANNER, PACK_FOOTER } from \"./constant\";\n\nexport const packPreset = (options: LibOptions): UserConfig[\"pack\"] => {\n const { entry = \"index\", inlineDeps = [] } = options;\n return {\n attw: false,\n banner: PACK_BANNER,\n deps: { onlyBundle: inlineDeps },\n devtools: true,\n dts: {\n tsgo: true,\n },\n entry:\n entry === \"index\"\n ? \"src/index.ts\"\n : entry === \"shallow\"\n ? \"src/*.ts\"\n : entry === \"all\"\n ? \"src/**/*.ts\"\n : entry,\n exports: {\n packageJson: true,\n legacy: true,\n },\n footer: PACK_FOOTER,\n platform: \"neutral\",\n plugins: [ApiSnapshot()],\n publint: \"ci-only\",\n shims: true,\n sourcemap: true,\n unused: true,\n };\n};\n"],"mappings":";;;AAAA,MAAa,cAAc;AAC3B,MAAa,cAAc;;;ACK3B,MAAa,cAAc,YAA4C;CACrE,MAAM,EAAE,QAAQ,SAAS,aAAa,CAAC,MAAM;CAC7C,OAAO;EACL,MAAM;EACN,QAAQ;EACR,MAAM,EAAE,YAAY,WAAW;EAC/B,UAAU;EACV,KAAK,EACH,MAAM,KACR;EACA,OACE,UAAU,UACN,iBACA,UAAU,YACR,aACA,UAAU,QACR,gBACA;EACV,SAAS;GACP,aAAa;GACb,QAAQ;EACV;EACA,QAAQ;EACR,UAAU;EACV,SAAS,CAAC,YAAY,CAAC;EACvB,SAAS;EACT,OAAO;EACP,WAAW;EACX,QAAQ;CACV;AACF"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bjmhe/viteplus-preset-pack",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "A
|
|
3
|
+
"version": "2.0.3",
|
|
4
|
+
"description": "A Tsdown preset for creating a TypeScript package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"package",
|
|
7
7
|
"preset",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
8
|
+
"tsdown",
|
|
9
|
+
"tsdown-preset",
|
|
10
|
+
"typescript"
|
|
11
11
|
],
|
|
12
12
|
"homepage": "https://github.com/bjmhe/viteplus-preset-pack#readme",
|
|
13
13
|
"bugs": {
|
|
@@ -20,9 +20,7 @@
|
|
|
20
20
|
"url": "git+https://github.com/bjmhe/viteplus-preset-pack.git"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
|
-
"dist"
|
|
24
|
-
"README.md",
|
|
25
|
-
"tsconfig.json"
|
|
23
|
+
"dist"
|
|
26
24
|
],
|
|
27
25
|
"type": "module",
|
|
28
26
|
"sideEffects": false,
|
|
@@ -36,33 +34,30 @@
|
|
|
36
34
|
"publishConfig": {
|
|
37
35
|
"access": "public"
|
|
38
36
|
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build": "vp pack",
|
|
41
|
-
"dev": "vp pack --watch",
|
|
42
|
-
"release": "bumpp",
|
|
43
|
-
"prepublishOnly": "vp run build"
|
|
44
|
-
},
|
|
45
37
|
"dependencies": {
|
|
46
|
-
"@bjmhe/viteplus-preset": "^1.0.7"
|
|
38
|
+
"@bjmhe/viteplus-preset": "^1.0.7",
|
|
39
|
+
"tsnapi": "^0.3.3"
|
|
47
40
|
},
|
|
48
41
|
"devDependencies": {
|
|
42
|
+
"@arethetypeswrong/core": "^0.18.2",
|
|
49
43
|
"@types/node": "^25.6.2",
|
|
50
44
|
"@typescript/native-preview": "7.0.0-dev.20260527.2",
|
|
51
45
|
"@vitest/coverage-v8": "^4.1.7",
|
|
52
46
|
"automd": "^0.4.3",
|
|
53
47
|
"bumpp": "^11.1.0",
|
|
54
|
-
"
|
|
48
|
+
"publint": "^0.3.21",
|
|
49
|
+
"typescript": "^6.0.3",
|
|
50
|
+
"unplugin-unused": "^0.5.7"
|
|
55
51
|
},
|
|
56
52
|
"peerDependencies": {
|
|
57
|
-
"@arethetypeswrong/core": "^0.18.2",
|
|
58
|
-
"publint": "^0.3.21",
|
|
59
|
-
"tsdown": "^0.22.0",
|
|
60
|
-
"tsnapi": "^0.3.3",
|
|
61
|
-
"unplugin-unused": "^0.5.7",
|
|
62
53
|
"vite-plus": "^0.1.20"
|
|
63
54
|
},
|
|
64
55
|
"engines": {
|
|
65
56
|
"node": ">=24.16.0"
|
|
66
57
|
},
|
|
67
|
-
"
|
|
68
|
-
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "vp pack",
|
|
60
|
+
"dev": "vp pack --watch",
|
|
61
|
+
"release": "bumpp"
|
|
62
|
+
}
|
|
63
|
+
}
|
package/tsconfig.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "esnext",
|
|
4
|
-
"lib": ["es2023"],
|
|
5
|
-
"moduleDetection": "force",
|
|
6
|
-
"module": "preserve",
|
|
7
|
-
"moduleResolution": "bundler",
|
|
8
|
-
"resolveJsonModule": true,
|
|
9
|
-
"types": ["node"],
|
|
10
|
-
"strict": true,
|
|
11
|
-
"noUnusedLocals": true,
|
|
12
|
-
"declaration": true,
|
|
13
|
-
"noEmit": true,
|
|
14
|
-
"allowImportingTsExtensions": true,
|
|
15
|
-
"esModuleInterop": true,
|
|
16
|
-
"isolatedModules": true,
|
|
17
|
-
"verbatimModuleSyntax": true,
|
|
18
|
-
"skipLibCheck": true
|
|
19
|
-
}
|
|
20
|
-
}
|