Skip to content

Commit

Permalink
fix: terminate process on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
teclone committed Jun 22, 2020
1 parent 6188193 commit 953980d
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,22 @@ args.options([
},
]);

const flags = args.parse(process.argv);
const getEntryPath = require('@teclone/node-utils').getEntryPath;
const run = () => {
const flags = args.parse(process.argv);
const getEntryPath = require('@teclone/node-utils').getEntryPath;

const loadFile = require(`${flags.dir}/modules/utils`).loadFile;
const Bundler = require(`${flags.dir}/modules/Bundler`).Bundler;
const loadFile = require(`${flags.dir}/modules/utils`).loadFile;
const Bundler = require(`${flags.dir}/modules/Bundler`).Bundler;

const entryPath = getEntryPath();
const options = loadFile(entryPath, 'rollup.config.js');
const entryPath = getEntryPath();
const options = loadFile(entryPath, 'rollup.config.js');

const bunder = new Bundler(options, {
generateOutputLogs: flags.silent !== true,
const bunder = new Bundler(options, {
generateOutputLogs: flags.silent !== true,
});
return bunder.process();
};

run().then(() => {
return process.exit(0);
});
bunder.process();

0 comments on commit 953980d

Please sign in to comment.