-
Notifications
You must be signed in to change notification settings - Fork 48
ci: unify GHA build process #1172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
89c8cad
2339b1e
501e80e
1bd2468
1df6c58
c497202
1941a5d
25d438c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,10 @@ | ||
| // @ts-check | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can this file be TS?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it requires installing a whole add'l dependency so i opted not to: https://rollupjs.org/command-line-interface/#config-intellisense |
||
| import commonjs from '@rollup/plugin-commonjs'; | ||
| import json from '@rollup/plugin-json'; | ||
| import { nodeResolve } from '@rollup/plugin-node-resolve'; | ||
| import replace from '@rollup/plugin-replace'; | ||
| import terser from '@rollup/plugin-terser'; | ||
| import { defineConfig } from 'rollup'; | ||
|
|
||
| const isProductionBuild = process.env.PRODUCTION_BUILD === 'true'; | ||
| import { minify } from 'rollup-plugin-esbuild'; | ||
|
|
||
| const basePlugins = [ | ||
| commonjs(), | ||
|
|
@@ -16,14 +15,9 @@ const basePlugins = [ | |
| exportConditions: ['node'], | ||
| preferBuiltins: true, | ||
| }), | ||
| minify(), | ||
| ]; | ||
|
|
||
| // only minify when doing a "production" build (i.e., for a release) | ||
| // it takes a lot longer! | ||
| if (isProductionBuild) { | ||
| basePlugins.push(terser()); | ||
| } | ||
|
|
||
| export default defineConfig([ | ||
| { | ||
| input: 'bin/run.js', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat