summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Drew Powers <1369770+drwpow@users.noreply.github.com> 2021-05-12 12:06:16 -0600
committerGravatar GitHub <noreply@github.com> 2021-05-12 12:06:16 -0600
commit3ef1b01e145aa4b29db5d8eadeeec68a36bc2d2e (patch)
treec627952f98d25da9172d790e817919f52dc92a37 /scripts
parent88529b679af014509191beda146a64170fa9476f (diff)
downloadastro-3ef1b01e145aa4b29db5d8eadeeec68a36bc2d2e.tar.gz
astro-3ef1b01e145aa4b29db5d8eadeeec68a36bc2d2e.tar.zst
astro-3ef1b01e145aa4b29db5d8eadeeec68a36bc2d2e.zip
[wip] Fix CI (#202)
* Yarn format * Fix changeset --since * Fix Windows tests
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmd/build.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/cmd/build.js b/scripts/cmd/build.js
index 250bb1efd..b46c8e61c 100644
--- a/scripts/cmd/build.js
+++ b/scripts/cmd/build.js
@@ -20,7 +20,10 @@ const defaultConfig = {
export default async function build(...args) {
const config = Object.assign({}, defaultConfig);
const isDev = args.slice(-1)[0] === 'IS_DEV';
- let entryPoints = [].concat(...(await Promise.all(args.map((pattern) => glob(pattern, { filesOnly: true, absolute: true })))));
+ const patterns = args
+ .filter((f) => !!f) // remove empty args
+ .map((f) => f.replace(/^'/, '').replace(/'$/, '')); // Needed for Windows: glob strings contain surrounding string chars??? remove these
+ let entryPoints = [].concat(...(await Promise.all(patterns.map((pattern) => glob(pattern, { filesOnly: true, absolute: true })))));
const { type = 'module', dependencies = {} } = await fs.readFile('./package.json').then((res) => JSON.parse(res.toString()));
const format = type === 'module' ? 'esm' : 'cjs';