From 3ff94faca1816316c61d557fe8cc79277eaa8db6 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 20 Jul 2021 09:29:45 -0400 Subject: [PATCH] build: fix default build script (ignore sfc-playground) close #4153 --- packages/sfc-playground/package.json | 7 ------- scripts/build.js | 9 ++++----- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/sfc-playground/package.json b/packages/sfc-playground/package.json index 4b500c45..b271031f 100644 --- a/packages/sfc-playground/package.json +++ b/packages/sfc-playground/package.json @@ -7,13 +7,6 @@ "build": "vite build", "serve": "vite preview" }, - "buildOptions": { - "formats": [ - "global" - ], - "env": "development", - "enableNonBrowserBranches": true - }, "devDependencies": { "@types/codemirror": "^0.0.108", "@vitejs/plugin-vue": "^1.2.0", diff --git a/scripts/build.js b/scripts/build.js index fde0b17c..9b5e37bf 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -75,8 +75,8 @@ async function build(target) { const pkgDir = path.resolve(`packages/${target}`) const pkg = require(`${pkgDir}/package.json`) - // only build published packages for release - if (isRelease && pkg.private) { + // if this is a full build (no specific targets), ignore private packages + if ((isRelease || !targets.length) && pkg.private) { return } @@ -118,9 +118,8 @@ async function build(target) { const { Extractor, ExtractorConfig } = require('@microsoft/api-extractor') const extractorConfigPath = path.resolve(pkgDir, `api-extractor.json`) - const extractorConfig = ExtractorConfig.loadFileAndPrepare( - extractorConfigPath - ) + const extractorConfig = + ExtractorConfig.loadFileAndPrepare(extractorConfigPath) const extractorResult = Extractor.invoke(extractorConfig, { localBuild: true, showVerboseMessages: true