@bjmhe/viteplus-preset-pack 1.0.7 → 2.0.2

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 CHANGED
@@ -21,21 +21,13 @@ vp add @bjmhe/viteplus-preset-pack
21
21
 
22
22
  <!-- automd:file src="./examples/vite.config.lib.ts" code lang="ts" -->
23
23
 
24
- ```ts [vite.config.lib.ts]
25
- import { lib } from "../src";
26
-
27
- export default lib();
28
- ```
24
+ <!-- ⚠️ (file) ENOENT: no such file or directory, open '/home/runner/work/viteplus-preset-pack/viteplus-preset-pack/examples/vite.config.lib.ts' -->
29
25
 
30
26
  <!-- /automd -->
31
27
 
32
28
  <!-- automd:file src="./examples/vite.config.nodelib.ts" code lang="ts" -->
33
29
 
34
- ```ts [vite.config.nodelib.ts]
35
- import { nodeLib } from "../src";
36
-
37
- export default nodeLib();
38
- ```
30
+ <!-- ⚠️ (file) ENOENT: no such file or directory, open '/home/runner/work/viteplus-preset-pack/viteplus-preset-pack/examples/vite.config.nodelib.ts' -->
39
31
 
40
32
  <!-- /automd -->
41
33
 
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
@@ -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 * as attw from \"@arethetypeswrong/core\";\nimport type { LibOptions } from \"@bjmhe/viteplus-preset\";\nimport * as publint from \"publint\";\nimport * as publintUtils from \"publint/utils\";\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: {\n enabled: false,\n profile: \"esm-only\",\n module: attw,\n level: \"warn\",\n },\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: {\n enabled: \"ci-only\",\n module: [publint, publintUtils],\n },\n shims: true,\n sourcemap: true,\n unused: true,\n };\n};\n"],"mappings":";;;;;;AAAA,MAAa,cAAc;AAC3B,MAAa,cAAc;;;ACQ3B,MAAa,cAAc,YAA4C;CACrE,MAAM,EAAE,QAAQ,SAAS,aAAa,CAAC,MAAM;CAC7C,OAAO;EACL,MAAM;GACJ,SAAS;GACT,SAAS;GACT,QAAQ;GACR,OAAO;EACT;EACA,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;GACP,SAAS;GACT,QAAQ,CAAC,SAAS,YAAY;EAChC;EACA,OAAO;EACP,WAAW;EACX,QAAQ;CACV;AACF"}
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@bjmhe/viteplus-preset-pack",
3
- "version": "1.0.7",
3
+ "version": "2.0.2",
4
4
  "description": "A Vite Plus preset for creating a TypeScript package.",
5
5
  "keywords": [
6
6
  "package",
@@ -36,12 +36,6 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "scripts": {
40
- "build": "vp pack",
41
- "dev": "vp pack --watch",
42
- "release": "bumpp",
43
- "prepublishOnly": "vp run build"
44
- },
45
39
  "dependencies": {
46
40
  "@bjmhe/viteplus-preset": "^1.0.7"
47
41
  },
@@ -64,5 +58,9 @@
64
58
  "engines": {
65
59
  "node": ">=24.16.0"
66
60
  },
67
- "packageManager": "pnpm@11.4.0"
68
- }
61
+ "scripts": {
62
+ "build": "vp pack",
63
+ "dev": "vp pack --watch",
64
+ "release": "bumpp"
65
+ }
66
+ }