Build cli using rollup.

This commit is contained in:
Mike Cao 2020-07-24 17:00:56 -07:00
parent 533ffbda13
commit 0f0b1e39e7
10 changed files with 175 additions and 23 deletions

18
rollup.cli.config.js Normal file
View file

@ -0,0 +1,18 @@
import 'dotenv/config';
import hashbang from 'rollup-plugin-hashbang';
import commonjs from '@rollup/plugin-commonjs';
export default {
input: 'cli/index.js',
output: {
file: 'cli.js',
format: 'cjs',
},
plugins: [
hashbang(),
commonjs({
include: 'node_modules/**',
}),
],
external: ['yargs', 'chalk', 'dotenv/config', '@prisma/client'],
};