@ceale/util 1.0.6 → 1.1.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/package.json +5 -3
- package/src/url.ts +3 -3
- package/tsconfig.json +5 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ceale/util",
|
|
3
3
|
"author": "Ceale",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"module": "index.ts",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -10,12 +10,14 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "bun run build:esm && bun run build:cjs",
|
|
12
12
|
"build:esm": "bun build --outdir=dist/esm/ --format=esm --target=node src/index.ts",
|
|
13
|
-
"build:cjs": "bun build --outdir=dist/cjs/ --format=cjs --target=node src/index.ts"
|
|
13
|
+
"build:cjs": "bun build --outdir=dist/cjs/ --format=cjs --target=node src/index.ts",
|
|
14
|
+
"build:ts": "tsc --outDir dist/ts/"
|
|
14
15
|
},
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
17
18
|
"import": "./dist/esm/index.js",
|
|
18
|
-
"require": "./dist/cjs/index.js"
|
|
19
|
+
"require": "./dist/cjs/index.js",
|
|
20
|
+
"types": "./dist/types/index.d.ts"
|
|
19
21
|
}
|
|
20
22
|
},
|
|
21
23
|
"devDependencies": {
|
package/src/url.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StringUtil } from "./string"
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
join(...path: string[]) {
|
|
3
|
+
export namespace UrlUtil {
|
|
4
|
+
const join = (...path: string[]) => {
|
|
5
5
|
return path
|
|
6
6
|
.filter(p => p !== '')
|
|
7
7
|
.map((p, index) => {
|
|
@@ -12,4 +12,4 @@ export const UrlUtil = (url?: string) => ({
|
|
|
12
12
|
})
|
|
13
13
|
.join("")
|
|
14
14
|
}
|
|
15
|
-
}
|
|
15
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
"allowJs": true,
|
|
9
9
|
|
|
10
10
|
// Bundler mode
|
|
11
|
+
"declaration": true,
|
|
12
|
+
"declarationDir": "dist/types/",
|
|
13
|
+
"emitDeclarationOnly": true,
|
|
11
14
|
"moduleResolution": "bundler",
|
|
12
15
|
"allowImportingTsExtensions": true,
|
|
13
16
|
"verbatimModuleSyntax": true,
|
|
14
|
-
"noEmit": true,
|
|
15
17
|
|
|
16
18
|
// Best practices
|
|
17
19
|
"strict": true,
|
|
@@ -29,5 +31,6 @@
|
|
|
29
31
|
"paths": {
|
|
30
32
|
"~/*": ["src/*"]
|
|
31
33
|
}
|
|
32
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"include": ["src/**/*"]
|
|
33
36
|
}
|