diff --git a/package.json b/package.json index 61db72441b..9a29a7a13d 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "build:core": "lerna run build --scope astro --scope astro-parser --scope create-astro", "build:vscode": "lerna run build --scope astro-languageserver --scope astro-vscode --scope astro-parser", "dev:vscode": "lerna run dev --scope astro-languageserver --scope astro-vscode --scope astro-parser --parallel --stream", - "format": "prettier -w '**/*.{js,jsx,ts,tsx,md,json}'", - "lint": "eslint 'packages/**/*.ts'", + "format": "prettier -w \"**/*.{js,jsx,ts,tsx,md,json}\"", + "lint": "eslint \"packages/**/*.ts\"", "test": "yarn test:core && yarn test:prettier", "test:core": "cd packages/astro && npm test", "test:prettier": "cd tools/prettier-plugin-astro && npm test" diff --git a/packages/astro-parser/package.json b/packages/astro-parser/package.json index 325336ca22..44225d677b 100644 --- a/packages/astro-parser/package.json +++ b/packages/astro-parser/package.json @@ -11,8 +11,8 @@ ], "scripts": { "prepublish": "yarn build", - "build": "astro-scripts build 'src/**/*.ts' && tsc -p tsconfig.json", - "dev": "astro-scripts dev 'src/**/*.ts'" + "build": "astro-scripts build \"src/**/*.ts\" && tsc -p tsconfig.json", + "dev": "astro-scripts dev \"src/**/*.ts\"" }, "devDependencies": { "astro-scripts": "0.0.1" diff --git a/packages/astro/package.json b/packages/astro/package.json index 936b10bce8..1d7b1fe2f7 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -25,9 +25,9 @@ "astro.mjs" ], "scripts": { - "build": "astro-scripts build 'src/*.ts' 'src/compiler/index.ts' 'src/frontend/**/*.ts' && tsc", - "postbuild": "astro-scripts copy 'src/**/*.astro'", - "dev": "astro-scripts dev 'src/**/*.ts'", + "build": "astro-scripts build \"src/*.ts\" \"src/compiler/index.ts\" \"src/frontend/**/*.ts\" && tsc", + "postbuild": "astro-scripts copy \"src/**/*.astro\"", + "dev": "astro-scripts dev \"src/**/*.ts\"", "test": "uvu test -i fixtures -i test-utils.js" }, "dependencies": { diff --git a/packages/create-astro/package.json b/packages/create-astro/package.json index 584e9514ec..a7e61871d0 100644 --- a/packages/create-astro/package.json +++ b/packages/create-astro/package.json @@ -10,7 +10,7 @@ }, "scripts": { "build": "astro-scripts build src/index.tsx", - "postbuild": "astro-scripts copy 'src/templates/**' --tgz" + "postbuild": "astro-scripts copy \"src/templates/**\" --tgz" }, "files": [ "dist", diff --git a/scripts/cmd/copy.js b/scripts/cmd/copy.js index 03718ef02e..da4ffd8ddc 100644 --- a/scripts/cmd/copy.js +++ b/scripts/cmd/copy.js @@ -1,9 +1,11 @@ import { promises as fs, readFileSync } from 'fs'; -import { resolve, dirname, sep, join } from 'path'; +import { posix } from 'path'; import arg from 'arg'; import glob from 'globby'; import tar from 'tar'; +const { resolve, dirname, sep, join } = posix; + /** @type {import('arg').Spec} */ const spec = { '--tgz': Boolean,