just use normal promises

pull/1389/head
Rich Harris 7 years ago
parent 5c78794f1b
commit 80b5156b17

@ -11,7 +11,7 @@ function mkdirp(dir) {
if (!fs.existsSync(dir)) fs.mkdirSync(dir);
}
export async function compile(input, opts) {
export function compile(input, opts) {
if (opts._.length > 0) {
error(`Can only compile a single file or directory`);
}

@ -21,9 +21,10 @@ prog
.example('compile src -o dest')
.example('compile -f umd MyComponent.html > MyComponent.js')
.action(async (input, opts) => {
const { compile } = await import('./compile.js');
.action((input, opts) => {
import('./compile.js').then(({ compile }) => {
compile(input, opts);
});
})
.parse(process.argv);
Loading…
Cancel
Save