@tochii/build 2.0.4 → 2.2.0
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/chunk-EOPXFG45.mjs +11 -0
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/tsup@8.4.0/chunk-BYH4XDRH.js +6 -0
- package/dist/tsup@8.4.0/chunk-GZSSIGNC.js +153 -0
- package/dist/tsup@8.4.0/chunk-JZ25TPTY.js +42 -0
- package/dist/tsup@8.4.0/chunk-TWFEYLU4.js +352 -0
- package/dist/tsup@8.4.0/chunk-VGC3FXLU.js +203 -0
- package/dist/tsup@8.4.0/cli-default.js +12 -0
- package/dist/tsup@8.4.0/cli-main.js +8 -0
- package/dist/tsup@8.4.0/cli-node.js +14 -0
- package/dist/tsup@8.4.0/index.d.ts +577 -0
- package/dist/tsup@8.4.0/index.js +1707 -0
- package/dist/tsup@8.4.0/rollup.js +6906 -0
- package/dist/{utils-CwdN3Nrj.d.mts → utils-CJIhwKYt.d.mts} +1 -0
- package/dist/utils.d.mts +2 -2
- package/dist/utils.mjs +1 -1
- package/package.json +54 -47
- package/dist/chunk-LBH52VOU.mjs +0 -11
@@ -5,6 +5,7 @@ type BuildOptionsOverrideParam<RequiredKeys extends keyof Options> = (overrideOp
|
|
5
5
|
type BuildOptionsParams<RequiredKeys extends keyof Options> = BuildOptionsParam<RequiredKeys> | BuildOptionsOverrideParam<RequiredKeys>;
|
6
6
|
type ConfigResult<RequiredKeys extends keyof Options> = BuildOptionsParam<RequiredKeys> | BuildOptionsOverrideParam<RequiredKeys>;
|
7
7
|
declare class BuildUtils {
|
8
|
+
static defaultConfigOptions: Options;
|
8
9
|
/**
|
9
10
|
* Array of commonly ignored entries
|
10
11
|
*
|
package/dist/utils.d.mts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { B as BuildUtils } from './utils-
|
2
|
-
export { b as BuildOptionsOverrideParam, a as BuildOptionsParam, c as BuildOptionsParams, C as ConfigResult } from './utils-
|
1
|
+
import { B as BuildUtils } from './utils-CJIhwKYt.mjs';
|
2
|
+
export { b as BuildOptionsOverrideParam, a as BuildOptionsParam, c as BuildOptionsParams, C as ConfigResult } from './utils-CJIhwKYt.mjs';
|
3
3
|
import 'tsup';
|
4
4
|
|
5
5
|
|
package/dist/utils.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{b as r,c as o}from"./chunk-
|
1
|
+
import{b as r,c as o}from"./chunk-EOPXFG45.mjs";var e=o;export{r as BuildUtils,e as default};
|
package/package.json
CHANGED
@@ -1,47 +1,54 @@
|
|
1
|
-
{
|
2
|
-
"name": "@tochii/build",
|
3
|
-
"version": "2.0
|
4
|
-
"description": "An extremely fast JavaScript/Typescript and CSS bundler with minimal configuration.",
|
5
|
-
"repository": "https://github.com/tochiResources/project/tree/main/packages/build.git",
|
6
|
-
"license": "MIT",
|
7
|
-
"keywords": [
|
8
|
-
"bundler",
|
9
|
-
"build",
|
10
|
-
"typescript",
|
11
|
-
"javascript",
|
12
|
-
"tsup",
|
13
|
-
"
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
"
|
23
|
-
"build
|
24
|
-
"
|
25
|
-
"build:
|
26
|
-
"build:
|
27
|
-
"release": "
|
28
|
-
"release:root": "
|
29
|
-
"release:tochibuild": "cd ./tochibuild && bun run release"
|
30
|
-
|
31
|
-
|
32
|
-
"
|
33
|
-
"
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
},
|
41
|
-
"
|
42
|
-
"
|
43
|
-
|
44
|
-
|
45
|
-
"
|
46
|
-
|
47
|
-
}
|
1
|
+
{
|
2
|
+
"name": "@tochii/build",
|
3
|
+
"version": "2.2.0",
|
4
|
+
"description": "An extremely fast JavaScript/Typescript and CSS bundler with minimal configuration.",
|
5
|
+
"repository": "https://github.com/tochiResources/project/tree/main/packages/build.git",
|
6
|
+
"license": "MIT",
|
7
|
+
"keywords": [
|
8
|
+
"bundler",
|
9
|
+
"build",
|
10
|
+
"typescript",
|
11
|
+
"javascript",
|
12
|
+
"tsup",
|
13
|
+
"esbuild",
|
14
|
+
"glob",
|
15
|
+
"cli",
|
16
|
+
"node",
|
17
|
+
"tochi",
|
18
|
+
"tochiResources"
|
19
|
+
],
|
20
|
+
"bin": "./dist/cli.mjs",
|
21
|
+
"scripts": {
|
22
|
+
"dev": "tsx cli.ts",
|
23
|
+
"build": "bun run build:root && bun run build:tochibuild",
|
24
|
+
"copybundler": "copyfiles -u 1 ./tochibuild/tsup@8.4.0/* ./dist",
|
25
|
+
"build:root": "tsx cli.ts && bun run copybundler",
|
26
|
+
"build:tochibuild": "cd ./tochibuild && bun run build",
|
27
|
+
"build:release": "bun run build:release:root && bun run build:release:tochibuild",
|
28
|
+
"build:release:root": "bun run build:root && bun run release:root",
|
29
|
+
"build:release:tochibuild": "cd ./tochibuild && bun run build && bun run release",
|
30
|
+
"install:tochibuild": "cd ./tochibuild && bun install",
|
31
|
+
"release": "bun run release:root && bun run release:tochibuild",
|
32
|
+
"release:root": "bun publish --access public --no-private",
|
33
|
+
"release:tochibuild": "cd ./tochibuild && bun run release"
|
34
|
+
},
|
35
|
+
"dependencies": {
|
36
|
+
"chalk": "^5.4.1",
|
37
|
+
"commander": "^13.1.0",
|
38
|
+
"deepmerge": "^4.3.1",
|
39
|
+
"tsup": "8.4.0"
|
40
|
+
},
|
41
|
+
"devDependencies": {
|
42
|
+
"@types/copyfiles": "^2",
|
43
|
+
"@types/node": "^22.15.17",
|
44
|
+
"copyfiles": "^2.4.1",
|
45
|
+
"tsx": "^4.19.4",
|
46
|
+
"typescript": "^5.8.3"
|
47
|
+
},
|
48
|
+
"engines": {
|
49
|
+
"node": ">=18.17.0"
|
50
|
+
},
|
51
|
+
"files": [
|
52
|
+
"dist"
|
53
|
+
]
|
54
|
+
}
|
package/dist/chunk-LBH52VOU.mjs
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
import g from"chalk";import f from"fs";import h from"path";import a from"chalk";var u="tochibuild",c=a.cyan(u),y=class{static{this.log=(...e)=>{console.log(c,...e)}}static{this.debug=(...e)=>{console.debug(c,...e)}}static{this.info=(...e)=>{console.info(c,...e)}}static{this.warn=(...e)=>{console.warn(c,...[...e].map(t=>a.yellow(t)))}}static{this.error=(e,...t)=>{console.error(a.red(u),a.bgRed(...t),e?.stack?`
|
2
|
-
${a.gray(e.stack)}`:"")}}static{this.success=(...e)=>{console.log(a.green(u),...e)}}static{this.custom=(e,...t)=>{console.log(e(u),...t)}}},l=y;var d=class i{static{this.ignoredEntries=["!build","!dist","!node_modules","!**/*/node_modules","!*.d.ts","!**/*/*.d.ts","!tochibuild.*","!tsup.*","!**/*/tochibuild.*","!**/*/tsup.*"]}static{this.entriesCommon=["*.js","*.ts","**/*/*.js","**/*/*.ts"]}static{this.entriesIndex=["index.js","index.ts","**/*/index.js","**/*/index.ts"]}static{this.defaultEntriesIndex=[...i.entriesIndex,...i.ignoredEntries]}static{this.defaultEntriesCommon=[...i.entriesCommon,...i.ignoredEntries]}static{this.defaultOptions=e=>O(e,t=>({tsconfig:"tsconfig.json",dts:!0,format:["esm"],minify:!0,...t,entry:x(t.entry,"ignoredEntries")}))}static{this.defaultOptionsWithIndexEntries=e=>O(e,t=>({tsconfig:"tsconfig.json",dts:!0,format:["esm"],minify:!0,...t,entry:x(t.entry,"defaultEntriesIndex")}))}static{this.defaultOptionsWithCommonEntries=e=>O(e,t=>({tsconfig:"tsconfig.json",dts:!0,format:["esm"],minify:!0,...t,entry:x(t.entry,"defaultEntriesCommon")}))}static{this.generateConfig=$}},D=d;function O(i,e){let t=n=>Array.isArray(n)?n.map(r=>({...e(r),...r})):{...e(n),...n};if(typeof i=="function"){let n=i;async function r(s){let B=await n(s);return t(B)}return r}return t(i)}function x(i,e){if(Array.isArray(i))return[...d[e],...i];let t={};return d[e].forEach(n=>t[n]=n),{...i,...t}}function q(i){return h.isAbsolute(i||".")?i:h.resolve(process.cwd(),i)}function $(i,e,t,n){let r="";try{let s=e?.ext||".ts",b=`${e?.filename||"tochibuild.config"}${s}`;(e?.outDir?.length?e.outDir:["."]).forEach(m=>{r=q(m),f.existsSync(m)||f.mkdirSync(m,{recursive:!0});let p=h.join(r,b),C=f.existsSync(p);!e?.overwrite&&C&&(l.warn(`the config '${b}' file already exists for this project.`),n&&process.exit(1));let K=" ",o="",E={clean:!1,splitting:!0},P=R=>{o+=R==="esm"?`import build from '${i}';
|
3
|
-
|
4
|
-
`:`const build = require('${i}');
|
5
|
-
|
6
|
-
`,o+=R==="esm"?`export default build.defineConfigWithIndexEntries({
|
7
|
-
`:`module.exports = build.defineConfigWithIndexEntries({
|
8
|
-
`,Object.entries(E).forEach(([j,k])=>{o+=`${K}${j}: ${JSON.stringify(k)},
|
9
|
-
`}),o+=`});
|
10
|
-
`};switch(s){case".ts":case".js":P("esm");break;case".cjs":P("cjs");break;case".json":o+=`${JSON.stringify({...E,entry:d.defaultEntriesIndex},null,2)}
|
11
|
-
`;break;default:l.error(void 0,`unsupported extension: ${s}`),process.exit(1)}f.writeFileSync(p,o),l.custom(g.green,g.cyan("the config file has been created at:"),g.gray(p))})}catch(s){if(t)throw s;l.error(s,s.message?`failed to generate config file in ${r}: ${s.message}`:`failed to generate config file in ${r}`),n&&process.exit(1)}}export{l as a,d as b,D as c};
|