-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added nodemon create/readme and updated package
updated package
- Loading branch information
Showing
9 changed files
with
84 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Relevant files | ||
!lib/** | ||
|
||
## Unrelevant files | ||
## Irrelevant files | ||
src/** | ||
.gitignore | ||
CODE_OF_CONDUCT.md | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import fs from 'fs-extra'; | ||
|
||
export const createNodemonConfig = (setupFilePath: string) => { | ||
const fileContent = ` | ||
{ | ||
"ignore": [ | ||
"**/*.test.ts", | ||
"**/*.spec.ts", | ||
".git", | ||
"node_modules" | ||
], | ||
"watch": [ | ||
"src" | ||
], | ||
"exec": "ts-node -r tsconfig-paths/register src/server.ts", | ||
"ext": "ts" | ||
} | ||
`; | ||
let filePath: string; | ||
if (setupFilePath) { | ||
filePath = setupFilePath; | ||
} else { | ||
filePath = process.cwd() + '/nodemon.json'; | ||
} | ||
fs.writeFile(filePath, fileContent, (err) => { | ||
if (err) throw err; | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
export type Spinner = { | ||
spinner: string | ||
color: string | ||
text: string | ||
stop: Function | ||
succeed: Function | ||
info: Function | ||
warn: Function | ||
export interface Spinner { | ||
spinner: string; | ||
color: string; | ||
text: string; | ||
stop: Function; | ||
succeed: Function; | ||
info: Function; | ||
warn: Function; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"ignore": [ | ||
"**/*.test.ts", | ||
"**/*.spec.ts", | ||
".git", | ||
"node_modules" | ||
], | ||
"watch": [ | ||
"src" | ||
], | ||
"exec": "ts-node -r tsconfig-paths/register src/server.ts", | ||
"ext": "ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"defaultSeverity": "error", | ||
"indent": [true, "tabs", 2], | ||
"extends": [ | ||
"tslint:recommended" | ||
], | ||
|