From: Jérôme Benoit Date: Sat, 20 May 2023 12:33:55 +0000 (+0200) Subject: build: cleanup build env usage X-Git-Tag: v2.5.0~31 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9dc351aa044ddec0ae64c258ea76c6474bee0346;p=poolifier.git build: cleanup build env usage Signed-off-by: Jérôme Benoit --- diff --git a/package.json b/package.json index d161c7f6..26c2f8a4 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "preinstall": "npx --yes only-allow pnpm", "prepare": "node prepare.js", "build": "rollup --config --environment BUILD:development", - "build:typedoc": "rollup --config --environment BUILD:development --environment DOCUMENTATION", + "build:analyze": "rollup --config --environment ANALYZE,BUILD:development", + "build:typedoc": "rollup --config --environment DOCUMENTATION,BUILD:development", "build:prod": "rollup --config", "benchmark": "pnpm build && node -r source-map-support/register benchmarks/internal/bench.js", "benchmark:debug": "pnpm build && node -r source-map-support/register --inspect benchmarks/internal/bench.js", diff --git a/rollup.config.mjs b/rollup.config.mjs index 9b9aa8a7..02fc54c0 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -5,8 +5,8 @@ import command from 'rollup-plugin-command' import del from 'rollup-plugin-delete' const isDevelopmentBuild = process.env.BUILD === 'development' -const isAnalyze = process.env.ANALYZE -const isDocumentation = process.env.DOCUMENTATION +const isAnalyzeBuild = process.env.ANALYZE +const isDocumentationBuild = process.env.DOCUMENTATION export default { input: 'src/index.ts', @@ -51,7 +51,7 @@ export default { del({ targets: ['lib/*'] }), - isAnalyze && analyze(), - isDocumentation && command('pnpm typedoc') + isAnalyzeBuild && analyze(), + isDocumentationBuild && command('pnpm typedoc') ] }