Closed oprearocks closed 7 years ago
As per the official Node.js documentation the module system works in multiple ways. One way is LOAD_AS_FILE(X) where if X.json is an actual file, X.json is parsed as a JavaScript Object. (see LOAD_AS_FILE -- 3.)
https://nodejs.org/dist/latest-v6.x/docs/api/modules.html#modules_all_together
Signed-off-by: Adrian Oprea adrian@oprea.rocks
refactor: Remove unused FileSystem module
Using require to read and parse JSON out of the config file makes requiring the fs module as a dependency unnecessary.
require
fs
As per the official Node.js documentation the module system works in multiple ways. One way is LOAD_AS_FILE(X) where if X.json is an actual file, X.json is parsed as a JavaScript Object. (see LOAD_AS_FILE -- 3.)
https://nodejs.org/dist/latest-v6.x/docs/api/modules.html#modules_all_together
Signed-off-by: Adrian Oprea adrian@oprea.rocks
refactor: Remove unused FileSystem module
Using
require
to read and parse JSON out of the config file makes requiring thefs
module as a dependency unnecessary.Signed-off-by: Adrian Oprea adrian@oprea.rocks