UNPKG

silvie

Version:

Typescript Back-end Framework

22 lines (20 loc) 903 B
#!/usr/bin/env node "use strict"; var _fs = _interopRequireDefault(require("fs")); var _path = _interopRequireDefault(require("path")); require("./path_flags"); require("../bootstrap/paths"); var _log = _interopRequireDefault(require("../utils/log")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } // Check to see if it is running in the project root if (process.rootPath !== process.cwd() || !_fs.default.existsSync(_path.default.resolve(process.rootPath, 'node_modules/silvie'))) { _log.default.error('[Silvie] Invalid Execution Path'); (0, _log.default)('Silvie CLI is only accessible from the project root'); (0, _log.default)('Project root is where silvie package is found under node_modules'); process.exit(); } require("../bootstrap/args"); require("../bootstrap/dotenv"); require("../bootstrap/configs"); // Import the main cli require("./cli");