Skip to content

feat: new --bare CLI option to generate a barebone project without example code #636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add snapshots for --bare flag
  • Loading branch information
haoqunjiang committed Dec 19, 2024
commit 639413f8b8bc85acc3175852c307610e8b6b0614
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
verification-script:
- pnpm --filter "\!*typescript*" build
- pnpm --filter "*typescript*" build
- pnpm --filter "*vitest*" test:unit
- pnpm --filter "*vitest*" --filter "\!*bare*" test:unit
- pnpm --filter "*eslint*" lint --no-fix --max-warnings=0
- pnpm --filter "*prettier*" format --write --check
# FIXME: it's failing now
Expand Down
19 changes: 10 additions & 9 deletions scripts/snapshot.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if (!/pnpm/.test(process.env.npm_config_user_agent ?? ''))
throw new Error("Please use pnpm ('pnpm run snapshot') to generate snapshots!")

const featureFlags = [
'bare',
'typescript',
'jsx',
'router',
Expand Down Expand Up @@ -54,11 +55,7 @@ function fullCombination(arr) {
}

let flagCombinations = fullCombination(featureFlags)
flagCombinations.push(
['default'],
['eslint'],
['eslint-with-prettier'],
)
flagCombinations.push(['default'], ['bare', 'default'], ['eslint'], ['eslint-with-prettier'])

// `--with-tests` are equivalent of `--vitest --cypress`
// Previously it means `--cypress` without `--vitest`.
Expand All @@ -84,10 +81,14 @@ for (const flags of flagCombinations) {
}

// 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)),
),
)
.filter((combination) => !(combination.length === 1 && combination[0] === 'bare'))

const bin = path.posix.relative('../playground/', '../outfile.cjs')

Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy