mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Add a src/tools dir to show exports
This commit is contained in:
parent
a05c843d46
commit
16dbde73a5
3 changed files with 13 additions and 2 deletions
|
|
@ -6,8 +6,6 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#.git"
|
"url": "git://github.com/#{USER_OR_ORG}#/#{REPO_NAME}#.git"
|
||||||
},
|
},
|
||||||
"main": "dist/index.js",
|
|
||||||
"types": "dist/index.d.ts",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo DODO",
|
"test": "echo DODO",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
|
|
@ -18,6 +16,13 @@
|
||||||
"format:check": "npm run _format -- --list-different",
|
"format:check": "npm run _format -- --list-different",
|
||||||
"link-in-app": "ts-node --skipProject scripts/link-in-app.ts"
|
"link-in-app": "ts-node --skipProject scripts/link-in-app.ts"
|
||||||
},
|
},
|
||||||
|
"main": "dist/index.js",
|
||||||
|
"types": "dist/index.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": "./dist/index.js",
|
||||||
|
"./*": "./dist/*.js",
|
||||||
|
"./tools": "./dist/tools/index.js"
|
||||||
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{ts,tsx}": [
|
"*.{ts,tsx}": [
|
||||||
"eslint --fix"
|
"eslint --fix"
|
||||||
|
|
|
||||||
5
src/tools/capitalize.ts
Normal file
5
src/tools/capitalize.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
/** @see <https://docs.tsafe.dev/capitalize> */
|
||||||
|
export function capitalize<S extends string>(str: S): Capitalize<S> {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
return (str.charAt(0).toUpperCase() + str.slice(1)) as any;
|
||||||
|
}
|
||||||
1
src/tools/index.ts
Normal file
1
src/tools/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
export * from "./capitalize";
|
||||||
Loading…
Add table
Add a link
Reference in a new issue