@jpp-toolkit/plugin-build-lib 0.0.73 → 0.0.75
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/dist/index.mjs +1 -3
- package/dist/index.mjs.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,6 @@ import { Command } from "@jpp-toolkit/core";
|
|
|
2
2
|
import { createTsdownConfig } from "@jpp-toolkit/tsdown-config";
|
|
3
3
|
import { Args, Flags } from "@oclif/core";
|
|
4
4
|
import { build } from "tsdown";
|
|
5
|
-
|
|
6
5
|
//#region src/lib-build-command.ts
|
|
7
6
|
const Preset = {
|
|
8
7
|
ESM: "esm",
|
|
@@ -53,11 +52,10 @@ var LibBuildCommand = class LibBuildCommand extends Command {
|
|
|
53
52
|
}));
|
|
54
53
|
}
|
|
55
54
|
};
|
|
56
|
-
|
|
57
55
|
//#endregion
|
|
58
56
|
//#region src/index.ts
|
|
59
57
|
const commands = { "build:lib": LibBuildCommand };
|
|
60
|
-
|
|
61
58
|
//#endregion
|
|
62
59
|
export { commands };
|
|
60
|
+
|
|
63
61
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["tsdownBuild"],"sources":["../src/lib-build-command.ts","../src/index.ts"],"sourcesContent":["import { Command } from '@jpp-toolkit/core';\nimport { createTsdownConfig } from '@jpp-toolkit/tsdown-config';\nimport { Args, Flags } from '@oclif/core';\nimport { build as tsdownBuild } from 'tsdown';\n\nconst Preset = {\n ESM: 'esm',\n CJS: 'cjs',\n HYBRID: 'hybrid',\n} as const;\ntype Preset = (typeof Preset)[keyof typeof Preset];\n\nconst presetFormatMap = {\n [Preset.ESM]: ['esm' as const],\n [Preset.CJS]: ['cjs' as const],\n [Preset.HYBRID]: ['esm' as const, 'cjs' as const],\n};\n\nexport class LibBuildCommand extends Command {\n static override summary = 'Build the project using predefined library build presets.';\n\n static override args = {\n preset: Args.string({\n name: 'preset',\n required: true,\n description: 'The build preset to use.',\n options: Object.values(Preset),\n }),\n };\n\n static override flags = {\n watch: Flags.boolean({\n char: 'w',\n description: 'Watch files for changes and rebuild automatically.',\n default: false,\n }),\n };\n\n static override examples = [\n {\n description: 'Build the library using the esm preset.',\n command: '<%= config.bin %> <%= command.id %> esm',\n },\n {\n description: 'Build the library using the cjs preset.',\n command: '<%= config.bin %> <%= command.id %> cjs',\n },\n {\n description: 'Build the library using the hybrid preset.',\n command: '<%= config.bin %> <%= command.id %> hybrid',\n },\n ];\n\n public async run(): Promise<void> {\n const { args, flags } = await this.parse(LibBuildCommand);\n const preset = args.preset as Preset;\n const { watch } = flags;\n\n this.logger.info(`Building library using the '${preset}' preset...`);\n\n const format = presetFormatMap[preset];\n const config = createTsdownConfig({ format, watch });\n await tsdownBuild(config);\n }\n}\n","import { LibBuildCommand } from './lib-build-command';\n\nexport const commands = {\n 'build:lib': LibBuildCommand,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["tsdownBuild"],"sources":["../src/lib-build-command.ts","../src/index.ts"],"sourcesContent":["import { Command } from '@jpp-toolkit/core';\nimport { createTsdownConfig } from '@jpp-toolkit/tsdown-config';\nimport { Args, Flags } from '@oclif/core';\nimport { build as tsdownBuild } from 'tsdown';\n\nconst Preset = {\n ESM: 'esm',\n CJS: 'cjs',\n HYBRID: 'hybrid',\n} as const;\ntype Preset = (typeof Preset)[keyof typeof Preset];\n\nconst presetFormatMap = {\n [Preset.ESM]: ['esm' as const],\n [Preset.CJS]: ['cjs' as const],\n [Preset.HYBRID]: ['esm' as const, 'cjs' as const],\n};\n\nexport class LibBuildCommand extends Command {\n static override summary = 'Build the project using predefined library build presets.';\n\n static override args = {\n preset: Args.string({\n name: 'preset',\n required: true,\n description: 'The build preset to use.',\n options: Object.values(Preset),\n }),\n };\n\n static override flags = {\n watch: Flags.boolean({\n char: 'w',\n description: 'Watch files for changes and rebuild automatically.',\n default: false,\n }),\n };\n\n static override examples = [\n {\n description: 'Build the library using the esm preset.',\n command: '<%= config.bin %> <%= command.id %> esm',\n },\n {\n description: 'Build the library using the cjs preset.',\n command: '<%= config.bin %> <%= command.id %> cjs',\n },\n {\n description: 'Build the library using the hybrid preset.',\n command: '<%= config.bin %> <%= command.id %> hybrid',\n },\n ];\n\n public async run(): Promise<void> {\n const { args, flags } = await this.parse(LibBuildCommand);\n const preset = args.preset as Preset;\n const { watch } = flags;\n\n this.logger.info(`Building library using the '${preset}' preset...`);\n\n const format = presetFormatMap[preset];\n const config = createTsdownConfig({ format, watch });\n await tsdownBuild(config);\n }\n}\n","import { LibBuildCommand } from './lib-build-command';\n\nexport const commands = {\n 'build:lib': LibBuildCommand,\n};\n"],"mappings":";;;;;AAKA,MAAM,SAAS;CACX,KAAK;CACL,KAAK;CACL,QAAQ;CACX;AAGD,MAAM,kBAAkB;EACnB,OAAO,MAAM,CAAC,MAAe;EAC7B,OAAO,MAAM,CAAC,MAAe;EAC7B,OAAO,SAAS,CAAC,OAAgB,MAAe;CACpD;AAED,IAAa,kBAAb,MAAa,wBAAwB,QAAQ;CACzC,OAAgB,UAAU;CAE1B,OAAgB,OAAO,EACnB,QAAQ,KAAK,OAAO;EAChB,MAAM;EACN,UAAU;EACV,aAAa;EACb,SAAS,OAAO,OAAO,OAAO;EACjC,CAAC,EACL;CAED,OAAgB,QAAQ,EACpB,OAAO,MAAM,QAAQ;EACjB,MAAM;EACN,aAAa;EACb,SAAS;EACZ,CAAC,EACL;CAED,OAAgB,WAAW;EACvB;GACI,aAAa;GACb,SAAS;GACZ;EACD;GACI,aAAa;GACb,SAAS;GACZ;EACD;GACI,aAAa;GACb,SAAS;GACZ;EACJ;CAED,MAAa,MAAqB;EAC9B,MAAM,EAAE,MAAM,UAAU,MAAM,KAAK,MAAM,gBAAgB;EACzD,MAAM,SAAS,KAAK;EACpB,MAAM,EAAE,UAAU;AAElB,OAAK,OAAO,KAAK,+BAA+B,OAAO,aAAa;EAEpE,MAAM,SAAS,gBAAgB;AAE/B,QAAMA,MADS,mBAAmB;GAAE;GAAQ;GAAO,CAAC,CAC3B;;;;;AC5DjC,MAAa,WAAW,EACpB,aAAa,iBAChB"}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jpp-toolkit/plugin-build-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.75",
|
|
4
4
|
"description": "Plugin that add the library build command to the jpp cli.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jpp",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@oclif/core": "4.8.3",
|
|
38
|
-
"tsdown": "0.
|
|
38
|
+
"tsdown": "0.21.0",
|
|
39
39
|
"@jpp-toolkit/core": "0.0.34",
|
|
40
|
-
"@jpp-toolkit/tsdown-config": "0.0.
|
|
40
|
+
"@jpp-toolkit/tsdown-config": "0.0.43",
|
|
41
41
|
"@jpp-toolkit/utils": "0.0.29"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"oclif": "4.22.
|
|
44
|
+
"oclif": "4.22.84"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": "24",
|