Skip to content

Commit

Permalink
fix: remove svrx-cli to @svrx/cli
Browse files Browse the repository at this point in the history
  • Loading branch information
int64ago committed Sep 23, 2019
1 parent 1ccf257 commit c884484
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions template/example/start.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
const path = require('path');
const Manager = require(
path.resolve(require('global-modules'),
'svrx-cli',
'lib'
));
const { existsSync } = require('fs');

const svrxCLI = path.resolve(require('global-modules'), '@svrx', 'cli', 'lib');

if (!existsSync(svrxCLI)) {
console.log('Please install svrx-cli by `npm i @svrx/cli -g`');
process.exit();
}

const Manager = require(svrxCLI);

process.chdir(__dirname);

Expand All @@ -12,6 +17,6 @@ manager.loadConfigFile();
Manager.loadSvrx({}, {
root: __dirname,
plugins: [{ path: path.resolve('..') }],
}).then(svrx => {
}).then((svrx) => {
svrx.start();
});

0 comments on commit c884484

Please sign in to comment.