Open artzhookov opened 7 years ago
Also I have another suggestion about development process: 1) remove devDependencies
"nci-projects-reloader": "1.1.3",
"nci-rest-api-server": "1.0.4",
"nci-static-server": "1.2.0",
"nci-yaml-reader": "1.2.1",
2) remove data
folder
3) remove nodemon
This package should be clear as much as possible because it is the "core" package.
For development process we should use separate package, that have nci
in dependencies list (nci-quick-setup
is a good candidate for this role). In this package nci
and other nci-...
packages could be linked with npm link (see my first comment).
I need to think about this suggestions carefully =) I'll try to do that on next weekends.
This PR fixes problem when
npm link
is used to link nci package to the project working directory (for example nci-quick-setup). Problem is described below. Also I made some refactoring in app/config.js and app/index.jsI have such folders structure:
When I run
nci
inside nci-quick-setup folder I get:This happens because
nci
tries to requireleveldown
, butleveldown
is a dependency ofnci-quick-setup
(custom db backend). Solving the problem is to do require call relative to cwd. I add import-cwd dependency and add method app.require that is used to require all external deps (db backend, plugins, proload.json).