Compare commits
4 Commits
c42964407e
...
e26ee50faf
| Author | SHA1 | Date | |
|---|---|---|---|
|
e26ee50faf
|
|||
|
d011f4547e
|
|||
|
a51dee55e4
|
|||
| 07a3867fcb |
@@ -7,4 +7,4 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- npm config set registry https://r.ctdn.net
|
- npm config set registry https://r.ctdn.net
|
||||||
- npm install
|
- npm install
|
||||||
- npm run build
|
- npm run build
|
||||||
|
|||||||
@@ -153,4 +153,4 @@ module.exports = {
|
|||||||
"use-isnan": "error",
|
"use-isnan": "error",
|
||||||
"valid-typeof": "off",
|
"valid-typeof": "off",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. "$(dirname "$0")/_/husky.sh"
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
npx lint-staged
|
npx lint-staged
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -1,10 +1,11 @@
|
|||||||
# TS Project (Template for TypeScript)
|
# TS Project (Template for TypeScript)
|
||||||
|
|
||||||
- TypeScript
|
- TypeScript
|
||||||
- TS Node Dev
|
- TS Node Dev
|
||||||
- Husky
|
- Husky
|
||||||
- Prettier
|
- Prettier
|
||||||
- ESLint
|
- ESLint
|
||||||
|
|
||||||
### Contributors
|
### Contributors
|
||||||
- Sambo Chea <sombochea@cubetiqs.com>
|
|
||||||
|
- Sambo Chea <sombochea@cubetiqs.com>
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "tsc -w",
|
"start": "tsc -w",
|
||||||
"build": "rm -rf dist && tsc"
|
"build": "rm -rf dist && tsc",
|
||||||
|
"prepare": "husky install"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -36,4 +36,4 @@ export const millisToSeconds = (millis: number) => {
|
|||||||
export const randomThenGetOne = (data: any[]): any => {
|
export const randomThenGetOne = (data: any[]): any => {
|
||||||
const randomIndex = Math.floor(Math.random() * data.length)
|
const randomIndex = Math.floor(Math.random() * data.length)
|
||||||
return data[randomIndex]
|
return data[randomIndex]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,4 +13,4 @@
|
|||||||
// parse2Int,
|
// parse2Int,
|
||||||
// parse2IntOrNull,
|
// parse2IntOrNull,
|
||||||
// parseToBoolean,
|
// parseToBoolean,
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -41,4 +41,4 @@ export const info = (message?: any, ...args: any[]) => {
|
|||||||
export const success = (message?: any, ...args: any[]) => {
|
export const success = (message?: any, ...args: any[]) => {
|
||||||
const msg = prefixColor("SUCCESS", message)
|
const msg = prefixColor("SUCCESS", message)
|
||||||
args.length === 0 ? logger.info(msg) : logger.info(msg, ...args)
|
args.length === 0 ? logger.info(msg) : logger.info(msg, ...args)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,4 +52,4 @@ class Logger {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Logger
|
export default Logger
|
||||||
|
|||||||
@@ -18,4 +18,4 @@ export const parseToBoolean = (
|
|||||||
): boolean => {
|
): boolean => {
|
||||||
if (!val) return defaultValue
|
if (!val) return defaultValue
|
||||||
return val === true || val.toLowerCase() === "true"
|
return val === true || val.toLowerCase() === "true"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,8 +12,7 @@
|
|||||||
"lib": ["ES2015"],
|
"lib": ["ES2015"],
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"declaration": true,
|
"declaration": true
|
||||||
"emitDeclarationOnly": false
|
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"]
|
"include": ["src/**/*"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user