]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
chore: format & update .prettierignore (#187)
authorbtea <2356281422@qq.com>
Thu, 24 Nov 2022 08:15:49 +0000 (16:15 +0800)
committerGitHub <noreply@github.com>
Thu, 24 Nov 2022 08:15:49 +0000 (16:15 +0800)
.prettierignore
scripts/snapshot.mjs
scripts/test.mjs

index 93549bcf01b4fc227d18a7e148eee5d7c90abeb3..e3a910d816b5b8ae31808bc0476ea0dfc91258c6 100644 (file)
@@ -5,3 +5,5 @@ pnpm-lock.yaml
 **/*.spec.js
 **/*.spec.ts
 **/dist
+# https://github.com/prettier/prettier/issues/5246
+**/*.html
\ No newline at end of file
index 5c70eddc2aa194229e1b917b474668ff0536c6e0..d50fe8c34522f1d821de4b36bda7e1ee256f0376 100644 (file)
@@ -4,7 +4,7 @@ import 'zx/globals'
 $.verbose = false
 
 if (!/pnpm/.test(process.env.npm_config_user_agent ?? ''))
-  throw new Error('Please use pnpm (\'pnpm run snapshot\') to generate snapshots!')
+  throw new Error("Please use pnpm ('pnpm run snapshot') to generate snapshots!")
 
 const featureFlags = ['typescript', 'jsx', 'router', 'pinia', 'vitest', 'cypress', 'playwright']
 const featureFlagsDenylist = [['cypress', 'playwright']]
@@ -42,7 +42,10 @@ let flagCombinations = fullCombination(featureFlags)
 flagCombinations.push(['default'])
 
 // Filter out combinations that are not allowed
-flagCombinations = flagCombinations.filter(combination => !featureFlagsDenylist.some(denylist => denylist.every(flag => combination.includes(flag))))
+flagCombinations = flagCombinations.filter(
+  (combination) =>
+    !featureFlagsDenylist.some((denylist) => denylist.every((flag) => combination.includes(flag)))
+)
 
 // `--with-tests` are equivalent of `--vitest --cypress`
 // Previously it means `--cypress` without `--vitest`.
index c585a0e125ddac0db1ebdce65f76232653e0d772..f6dc2fa4e927430062299770d41685adb9e6413f 100644 (file)
@@ -2,16 +2,16 @@
 import 'zx/globals'
 
 // Vitest would otherwise enable watch mode by default.
-process.env.CI = '1';
+process.env.CI = '1'
 
 const playgroundDir = path.resolve(__dirname, '../playground/')
-let projects = fs.readdirSync(playgroundDir, { withFileTypes: true })
-  .filter(dirent => dirent.isDirectory())
-  .map(dirent => dirent.name)
-  .filter(name => !name.startsWith('.') && name !== 'node_modules')
+let projects = fs
+  .readdirSync(playgroundDir, { withFileTypes: true })
+  .filter((dirent) => dirent.isDirectory())
+  .map((dirent) => dirent.name)
+  .filter((name) => !name.startsWith('.') && name !== 'node_modules')
 
-if (process.argv[3])
-  projects = projects.filter(project => project.includes(process.argv[3]))
+if (process.argv[3]) projects = projects.filter((project) => project.includes(process.argv[3]))
 
 cd(playgroundDir)
 console.log('Installing playground dependencies')
@@ -19,7 +19,7 @@ await $`pnpm install`
 
 for (const projectName of projects) {
   cd(path.resolve(playgroundDir, projectName))
-  const packageJSON = require(path.resolve(playgroundDir, projectName, 'package.json'));
+  const packageJSON = require(path.resolve(playgroundDir, projectName, 'package.json'))
 
   console.log(`Building ${projectName}`)
   await $`pnpm build`