From 9dc351aa044ddec0ae64c258ea76c6474bee0346 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 20 May 2023 14:33:55 +0200 Subject: [PATCH] build: cleanup build env usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- package.json | 3 ++- rollup.config.mjs | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) 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') ] } -- 2.34.1