Skip to content

Commit 2693819

Browse files
committed
1.0.14
1 parent b8a99ea commit 2693819

File tree

5 files changed

+27
-27
lines changed

5 files changed

+27
-27
lines changed

Readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# ↻ ♾️ NodeRel
22
[NodeRel](https://wutility.github.io/noderel) is a tool that automatically restarting the node application when file changes.
33

4-
![downloads](https://badgen.net/npm/dt/noderel) ![version](http://img.shields.io/npm/v/noderel.svg?style=flat-square)
4+
![downloads](https://badgen.net/npm/dt/noderel) ![version](http://img.shields.io/npm/v/noderel.svg)
5+
56

67
- Fast and simple to use.
78
- Automatic re-running.
File renamed without changes.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "noderel",
3-
"version": "1.0.13",
3+
"version": "1.0.14",
44
"description": "Noderel a development tool for Node.js that automatically restarts the node process when a file is modified.",
55
"main": "src/noderel.js",
66
"bin": {
@@ -14,13 +14,13 @@
1414
"tests": "node bin/cli -e tests/server.js"
1515
},
1616
"dependencies": {
17-
"chokidar": "^3.5.3",
18-
"minimist": "^1.2.6",
17+
"chokidar": "^3.6.0",
18+
"minimist": "^1.2.8",
1919
"tree-kill": "^1.2.2"
2020
},
2121
"devDependencies": {
22-
"express": "^4.17.1",
23-
"servino": "^1.0.4"
22+
"express": "^4.19.2",
23+
"servino": "^2.0.9"
2424
},
2525
"keywords": [
2626
"hot reload",

src/LoadConfig.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1-
const ResolveEntryFile = require('./util/ResolveEntryFile');
1+
const fs = require('fs'),
2+
path = require('path');
3+
4+
/**
5+
* @param {String} entryFile
6+
* @returns {String} entryFilePath
7+
*/
8+
function ResolveEntryFile(entryFile) {
9+
try {
10+
if (entryFile) {
11+
return path.relative(process.cwd(), entryFile);
12+
}
13+
else {
14+
return JSON.parse(fs.readFileSync(path.relative(process.cwd(), 'package.json'), 'utf8')).main
15+
}
16+
} catch (err) {
17+
console.log('Process Failed: Entry file not found', err.message);
18+
process.exit(1)
19+
}
20+
}
221

322
/**
423
* @param {Object} options

src/util/ResolveEntryFile.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)