create-typescript-app 2.0.0-beta.7 → 2.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -55
- package/bin/index.js +14 -2
- package/lib/{next/base.d.ts → base.d.ts} +24 -4
- package/lib/{next/base.js → base.js} +19 -22
- package/lib/base.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockAllContributors.d.ts +1 -1
- package/lib/blocks/blockAllContributors.js +139 -0
- package/lib/blocks/blockAllContributors.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockAreTheTypesWrong.d.ts +1 -1
- package/lib/blocks/blockAreTheTypesWrong.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockCSpell.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockCSpell.js +1 -1
- package/lib/blocks/blockCSpell.js.map +1 -0
- package/lib/blocks/blockCodecov.d.ts +52 -0
- package/lib/blocks/blockCodecov.js +50 -0
- package/lib/blocks/blockCodecov.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockContributingDocs.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockContributingDocs.js +2 -1
- package/lib/blocks/blockContributingDocs.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockContributorCovenant.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockContributorCovenant.js +2 -1
- package/lib/blocks/blockContributorCovenant.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockDevelopmentDocs.d.ts +3 -3
- package/lib/{next/blocks → blocks}/blockDevelopmentDocs.js +3 -2
- package/lib/blocks/blockDevelopmentDocs.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLint.d.ts +8 -7
- package/lib/{next/blocks → blocks}/blockESLint.js +14 -5
- package/lib/blocks/blockESLint.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintComments.d.ts +1 -1
- package/lib/blocks/blockESLintComments.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintJSDoc.d.ts +1 -1
- package/lib/blocks/blockESLintJSDoc.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintJSONC.d.ts +1 -1
- package/lib/blocks/blockESLintJSONC.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintMarkdown.d.ts +1 -1
- package/lib/blocks/blockESLintMarkdown.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintMoreStyling.d.ts +1 -1
- package/lib/blocks/blockESLintMoreStyling.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintNode.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockESLintNode.js +7 -5
- package/lib/blocks/blockESLintNode.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintPackageJson.d.ts +1 -1
- package/lib/blocks/blockESLintPackageJson.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintPerfectionist.d.ts +1 -1
- package/lib/blocks/blockESLintPerfectionist.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintRegexp.d.ts +1 -1
- package/lib/blocks/blockESLintRegexp.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockESLintYML.d.ts +1 -1
- package/lib/blocks/blockESLintYML.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockExampleFiles.d.ts +1 -1
- package/lib/blocks/blockExampleFiles.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockFunding.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockFunding.js +1 -1
- package/lib/blocks/blockFunding.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockGitHubActionsCI.d.ts +29 -3
- package/lib/{next/blocks → blocks}/blockGitHubActionsCI.js +21 -17
- package/lib/blocks/blockGitHubActionsCI.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockGitHubApps.d.ts +1 -1
- package/lib/blocks/blockGitHubApps.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockGitHubIssueTemplates.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockGitHubIssueTemplates.js +1 -1
- package/lib/blocks/blockGitHubIssueTemplates.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockGitHubPRTemplate.d.ts +1 -1
- package/lib/blocks/blockGitHubPRTemplate.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockGitignore.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockGitignore.js +1 -1
- package/lib/blocks/blockGitignore.js.map +1 -0
- package/lib/blocks/blockKnip.d.ts +52 -0
- package/lib/{next/blocks → blocks}/blockKnip.js +15 -5
- package/lib/blocks/blockKnip.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockMITLicense.d.ts +1 -1
- package/lib/blocks/blockMITLicense.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockMarkdownlint.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockMarkdownlint.js +10 -7
- package/lib/blocks/blockMarkdownlint.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockNvmrc.d.ts +1 -1
- package/lib/blocks/blockNvmrc.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPRCompliance.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockPRCompliance.js +1 -1
- package/lib/blocks/blockPRCompliance.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPackageJson.d.ts +2 -2
- package/lib/{next/blocks → blocks}/blockPackageJson.js +7 -4
- package/lib/blocks/blockPackageJson.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPnpmDedupe.d.ts +1 -1
- package/lib/blocks/blockPnpmDedupe.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPrettier.d.ts +2 -2
- package/lib/{next/blocks → blocks}/blockPrettier.js +6 -3
- package/lib/blocks/blockPrettier.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPrettierPluginCurly.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginCurly.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPrettierPluginPackageJson.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginPackageJson.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockPrettierPluginSh.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginSh.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockREADME.d.ts +3 -1
- package/lib/{next/blocks → blocks}/blockREADME.js +16 -19
- package/lib/blocks/blockREADME.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockReleaseIt.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockReleaseIt.js +2 -2
- package/lib/blocks/blockReleaseIt.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockRenovate.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockRenovate.js +6 -1
- package/lib/blocks/blockRenovate.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockRepositoryBranchRuleset.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockRepositoryBranchRuleset.js +0 -1
- package/lib/blocks/blockRepositoryBranchRuleset.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockRepositoryLabels.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockRepositoryLabels.js +1 -1
- package/lib/blocks/blockRepositoryLabels.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockRepositorySecrets.d.ts +2 -2
- package/lib/blocks/blockRepositorySecrets.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockRepositorySettings.d.ts +1 -1
- package/lib/blocks/blockRepositorySettings.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockSecurityDocs.d.ts +1 -1
- package/lib/blocks/blockSecurityDocs.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockTSup.d.ts +2 -1
- package/lib/{next/blocks → blocks}/blockTSup.js +18 -4
- package/lib/blocks/blockTSup.js.map +1 -0
- package/lib/{next/blocks/blockKnip.d.ts → blocks/blockTemplatedWith.d.ts} +3 -3
- package/lib/{next/blocks/blockTemplatedBy.js → blocks/blockTemplatedWith.js} +3 -3
- package/lib/blocks/blockTemplatedWith.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockTypeScript.d.ts +1 -1
- package/lib/{next/blocks → blocks}/blockTypeScript.js +2 -2
- package/lib/blocks/blockTypeScript.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockVSCode.d.ts +1 -1
- package/lib/blocks/blockVSCode.js.map +1 -0
- package/lib/{next/blocks → blocks}/blockVitest.d.ts +10 -5
- package/lib/{next/blocks → blocks}/blockVitest.js +19 -34
- package/lib/blocks/blockVitest.js.map +1 -0
- package/lib/blocks/files/createJobName.d.ts +3 -0
- package/lib/blocks/files/createJobName.js +7 -0
- package/lib/blocks/files/createJobName.js.map +1 -0
- package/lib/{steps/writing/creation/dotGitHub → blocks/files}/createMultiWorkflowFile.js +2 -1
- package/lib/blocks/files/createMultiWorkflowFile.js.map +1 -0
- package/lib/{steps/writing/creation/dotGitHub → blocks/files}/createSoloWorkflowFile.js +2 -1
- package/lib/blocks/files/createSoloWorkflowFile.js.map +1 -0
- package/lib/blocks/files/formatIgnoreFile.js.map +1 -0
- package/lib/{steps/writing/creation/dotGitHub → blocks/files}/formatWorkflowYaml.js +1 -1
- package/lib/blocks/files/formatWorkflowYaml.js.map +1 -0
- package/lib/{steps/writing/creation/formatters → blocks/files}/formatYaml.js +1 -3
- package/lib/blocks/files/formatYaml.js.map +1 -0
- package/lib/blocks/index.d.ts +2141 -0
- package/lib/blocks/index.js +178 -0
- package/lib/blocks/index.js.map +1 -0
- package/lib/blocks/options.fakes.js.map +1 -0
- package/lib/{steps/initializeGitHubRepository → blocks}/outcomeLabels.js +1 -0
- package/lib/blocks/outcomeLabels.js.map +1 -0
- package/lib/blocks/phases.js.map +1 -0
- package/lib/{next/blocks/sourcePackageJson.d.ts → data/packageData.d.ts} +44 -50
- package/lib/{next/blocks → data}/packageData.js +9 -3
- package/lib/data/packageData.js.map +1 -0
- package/lib/index.d.ts +50 -48
- package/lib/index.js +4 -5
- package/lib/index.js.map +1 -1
- package/lib/options/getUsageFromReadme.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/parsePackageAuthor.d.ts +1 -3
- package/lib/options/parsePackageAuthor.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readDefaultsFromReadme.d.ts +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readDefaultsFromReadme.js +12 -3
- package/lib/options/readDefaultsFromReadme.js.map +1 -0
- package/lib/{next → options}/readDescription.d.ts +1 -3
- package/lib/{next → options}/readDescription.js +2 -2
- package/lib/options/readDescription.js.map +1 -0
- package/lib/options/readDescriptionFromReadme.js.map +1 -0
- package/lib/{next → options}/readDocumentation.js +1 -1
- package/lib/options/readDocumentation.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readEmails.js +1 -1
- package/lib/options/readEmails.js.map +1 -0
- package/lib/options/readFileAsJson.js.map +1 -0
- package/lib/options/readFileSafe.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readFunding.js +1 -1
- package/lib/options/readFunding.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readGitHubEmail.js +1 -1
- package/lib/options/readGitHubEmail.js.map +1 -0
- package/lib/{shared/options/createOptionDefaults → options}/readGuide.js +1 -1
- package/lib/options/readGuide.js.map +1 -0
- package/lib/{shared/options → options}/readLogoSizing.js +1 -1
- package/lib/options/readLogoSizing.js.map +1 -0
- package/lib/options/readPackageData.d.ts +5 -0
- package/lib/options/readPackageData.js +8 -0
- package/lib/options/readPackageData.js.map +1 -0
- package/lib/{next/presets/presetCommon.d.ts → presets/common.d.ts} +1 -1
- package/lib/{next/presets/presetCommon.js → presets/common.js} +6 -2
- package/lib/presets/common.js.map +1 -0
- package/lib/{next/presets/presetEverything.d.ts → presets/everything.d.ts} +1 -1
- package/lib/{next/presets/presetEverything.js → presets/everything.js} +2 -4
- package/lib/presets/everything.js.map +1 -0
- package/lib/presets/index.d.ts +310 -0
- package/lib/presets/index.js +18 -0
- package/lib/presets/index.js.map +1 -0
- package/lib/{next/presets/presetMinimal.d.ts → presets/minimal.d.ts} +1 -1
- package/lib/{next/presets/presetMinimal.js → presets/minimal.js} +5 -5
- package/lib/presets/minimal.js.map +1 -0
- package/lib/{next/template.d.ts → template.d.ts} +1 -1
- package/lib/{next/template.js → template.js} +3 -3
- package/lib/template.js.map +1 -0
- package/lib/types.d.ts +31 -5
- package/lib/utils/resolveBin.js.map +1 -0
- package/lib/utils/sortObject.js.map +1 -0
- package/lib/utils/swallowError.js.map +1 -0
- package/lib/utils/tryCatchAsync.js.map +1 -0
- package/lib/utils/tryCatchLazyValueAsync.js.map +1 -0
- package/package.json +21 -31
- package/lib/bin/help.d.ts +0 -3
- package/lib/bin/help.js +0 -117
- package/lib/bin/help.js.map +0 -1
- package/lib/bin/index.d.ts +0 -5
- package/lib/bin/index.js +0 -91
- package/lib/bin/index.js.map +0 -1
- package/lib/bin/packageJson.d.ts +0 -3
- package/lib/bin/packageJson.js +0 -13
- package/lib/bin/packageJson.js.map +0 -1
- package/lib/bin/promptForMode.d.ts +0 -11
- package/lib/bin/promptForMode.js +0 -108
- package/lib/bin/promptForMode.js.map +0 -1
- package/lib/create/createAndEnterGitDirectory.d.ts +0 -3
- package/lib/create/createAndEnterGitDirectory.js +0 -20
- package/lib/create/createAndEnterGitDirectory.js.map +0 -1
- package/lib/create/createRerunDirectorySuggestion.d.ts +0 -7
- package/lib/create/createRerunDirectorySuggestion.js +0 -8
- package/lib/create/createRerunDirectorySuggestion.js.map +0 -1
- package/lib/create/createRerunSuggestion.d.ts +0 -7
- package/lib/create/createRerunSuggestion.js +0 -56
- package/lib/create/createRerunSuggestion.js.map +0 -1
- package/lib/create/createWithOptions.d.ts +0 -11
- package/lib/create/createWithOptions.js +0 -68
- package/lib/create/createWithOptions.js.map +0 -1
- package/lib/create/index.d.ts +0 -7
- package/lib/create/index.js +0 -69
- package/lib/create/index.js.map +0 -1
- package/lib/greet.d.ts +0 -5
- package/lib/greet.js +0 -14
- package/lib/greet.js.map +0 -1
- package/lib/initialize/index.d.ts +0 -7
- package/lib/initialize/index.js +0 -43
- package/lib/initialize/index.js.map +0 -1
- package/lib/initialize/initializeWithOptions.d.ts +0 -9
- package/lib/initialize/initializeWithOptions.js +0 -66
- package/lib/initialize/initializeWithOptions.js.map +0 -1
- package/lib/migrate/index.d.ts +0 -7
- package/lib/migrate/index.js +0 -43
- package/lib/migrate/index.js.map +0 -1
- package/lib/migrate/migrateWithOptions.d.ts +0 -9
- package/lib/migrate/migrateWithOptions.js +0 -72
- package/lib/migrate/migrateWithOptions.js.map +0 -1
- package/lib/next/base.js.map +0 -1
- package/lib/next/blocks/blockAllContributors.js +0 -65
- package/lib/next/blocks/blockAllContributors.js.map +0 -1
- package/lib/next/blocks/blockAreTheTypesWrong.js.map +0 -1
- package/lib/next/blocks/blockCSpell.js.map +0 -1
- package/lib/next/blocks/blockContributingDocs.js.map +0 -1
- package/lib/next/blocks/blockContributorCovenant.js.map +0 -1
- package/lib/next/blocks/blockDevelopmentDocs.js.map +0 -1
- package/lib/next/blocks/blockESLint.js.map +0 -1
- package/lib/next/blocks/blockESLintComments.js.map +0 -1
- package/lib/next/blocks/blockESLintJSDoc.js.map +0 -1
- package/lib/next/blocks/blockESLintJSONC.js.map +0 -1
- package/lib/next/blocks/blockESLintMarkdown.js.map +0 -1
- package/lib/next/blocks/blockESLintMoreStyling.js.map +0 -1
- package/lib/next/blocks/blockESLintNode.js.map +0 -1
- package/lib/next/blocks/blockESLintPackageJson.js.map +0 -1
- package/lib/next/blocks/blockESLintPerfectionist.js.map +0 -1
- package/lib/next/blocks/blockESLintRegexp.js.map +0 -1
- package/lib/next/blocks/blockESLintYML.js.map +0 -1
- package/lib/next/blocks/blockExampleFiles.js.map +0 -1
- package/lib/next/blocks/blockFunding.js.map +0 -1
- package/lib/next/blocks/blockGitHubActionsCI.js.map +0 -1
- package/lib/next/blocks/blockGitHubApps.js.map +0 -1
- package/lib/next/blocks/blockGitHubIssueTemplates.js.map +0 -1
- package/lib/next/blocks/blockGitHubPRTemplate.js.map +0 -1
- package/lib/next/blocks/blockGitignore.js.map +0 -1
- package/lib/next/blocks/blockKnip.js.map +0 -1
- package/lib/next/blocks/blockMITLicense.js.map +0 -1
- package/lib/next/blocks/blockMarkdownlint.js.map +0 -1
- package/lib/next/blocks/blockNvmrc.js.map +0 -1
- package/lib/next/blocks/blockPRCompliance.js.map +0 -1
- package/lib/next/blocks/blockPackageJson.js.map +0 -1
- package/lib/next/blocks/blockPnpmDedupe.js.map +0 -1
- package/lib/next/blocks/blockPrettier.js.map +0 -1
- package/lib/next/blocks/blockPrettierPluginCurly.js.map +0 -1
- package/lib/next/blocks/blockPrettierPluginPackageJson.js.map +0 -1
- package/lib/next/blocks/blockPrettierPluginSh.js.map +0 -1
- package/lib/next/blocks/blockREADME.js.map +0 -1
- package/lib/next/blocks/blockReleaseIt.js.map +0 -1
- package/lib/next/blocks/blockRenovate.js.map +0 -1
- package/lib/next/blocks/blockRepositoryBranchRuleset.js.map +0 -1
- package/lib/next/blocks/blockRepositoryLabels.js.map +0 -1
- package/lib/next/blocks/blockRepositorySecrets.js.map +0 -1
- package/lib/next/blocks/blockRepositorySettings.js.map +0 -1
- package/lib/next/blocks/blockSecurityDocs.js.map +0 -1
- package/lib/next/blocks/blockTSup.js.map +0 -1
- package/lib/next/blocks/blockTemplatedBy.d.ts +0 -50
- package/lib/next/blocks/blockTemplatedBy.js.map +0 -1
- package/lib/next/blocks/blockTypeScript.js.map +0 -1
- package/lib/next/blocks/blockVSCode.js.map +0 -1
- package/lib/next/blocks/blockVitest.js.map +0 -1
- package/lib/next/blocks/index.d.ts +0 -43
- package/lib/next/blocks/index.js +0 -43
- package/lib/next/blocks/index.js.map +0 -1
- package/lib/next/blocks/options.fakes.js.map +0 -1
- package/lib/next/blocks/packageData.d.ts +0 -6
- package/lib/next/blocks/packageData.js.map +0 -1
- package/lib/next/blocks/phases.js.map +0 -1
- package/lib/next/blocks/sourcePackageJson.js +0 -10
- package/lib/next/blocks/sourcePackageJson.js.map +0 -1
- package/lib/next/presets/index.d.ts +0 -5
- package/lib/next/presets/index.js +0 -4
- package/lib/next/presets/index.js.map +0 -1
- package/lib/next/presets/presetCommon.js.map +0 -1
- package/lib/next/presets/presetEverything.js.map +0 -1
- package/lib/next/presets/presetMinimal.js.map +0 -1
- package/lib/next/readDescription.js.map +0 -1
- package/lib/next/readDescriptionFromReadme.js.map +0 -1
- package/lib/next/readDocumentation.js.map +0 -1
- package/lib/next/runCreateEnginePreset.d.ts +0 -7
- package/lib/next/runCreateEnginePreset.js +0 -20
- package/lib/next/runCreateEnginePreset.js.map +0 -1
- package/lib/next/template.js.map +0 -1
- package/lib/next/utils/resolveBin.js.map +0 -1
- package/lib/next/utils/sortObject.js.map +0 -1
- package/lib/next/utils/swallowError.js.map +0 -1
- package/lib/shared/cli/lines.d.ts +0 -5
- package/lib/shared/cli/lines.js +0 -17
- package/lib/shared/cli/lines.js.map +0 -1
- package/lib/shared/cli/lowerFirst.d.ts +0 -3
- package/lib/shared/cli/lowerFirst.js +0 -7
- package/lib/shared/cli/lowerFirst.js.map +0 -1
- package/lib/shared/cli/outro.d.ts +0 -8
- package/lib/shared/cli/outro.js +0 -21
- package/lib/shared/cli/outro.js.map +0 -1
- package/lib/shared/cli/spinners.d.ts +0 -6
- package/lib/shared/cli/spinners.js +0 -50
- package/lib/shared/cli/spinners.js.map +0 -1
- package/lib/shared/cli/startLineWithDots.d.ts +0 -3
- package/lib/shared/cli/startLineWithDots.js +0 -32
- package/lib/shared/cli/startLineWithDots.js.map +0 -1
- package/lib/shared/codes.d.ts +0 -8
- package/lib/shared/codes.js +0 -9
- package/lib/shared/codes.js.map +0 -1
- package/lib/shared/createCleanupCommands.d.ts +0 -3
- package/lib/shared/createCleanupCommands.js +0 -13
- package/lib/shared/createCleanupCommands.js.map +0 -1
- package/lib/shared/doesRepositoryExist.d.ts +0 -9
- package/lib/shared/doesRepositoryExist.js +0 -18
- package/lib/shared/doesRepositoryExist.js.map +0 -1
- package/lib/shared/ensureGitRepository.d.ts +0 -3
- package/lib/shared/ensureGitRepository.js +0 -12
- package/lib/shared/ensureGitRepository.js.map +0 -1
- package/lib/shared/generateNextSteps.d.ts +0 -8
- package/lib/shared/generateNextSteps.js +0 -60
- package/lib/shared/generateNextSteps.js.map +0 -1
- package/lib/shared/getGitHubUserAsAllContributor.d.ts +0 -8
- package/lib/shared/getGitHubUserAsAllContributor.js +0 -43
- package/lib/shared/getGitHubUserAsAllContributor.js.map +0 -1
- package/lib/shared/isUsingCreateEngine.d.ts +0 -3
- package/lib/shared/isUsingCreateEngine.js +0 -7
- package/lib/shared/isUsingCreateEngine.js.map +0 -1
- package/lib/shared/options/args.d.ts +0 -273
- package/lib/shared/options/args.js +0 -335
- package/lib/shared/options/args.js.map +0 -1
- package/lib/shared/options/augmentOptionsWithExcludes.d.ts +0 -7
- package/lib/shared/options/augmentOptionsWithExcludes.js +0 -94
- package/lib/shared/options/augmentOptionsWithExcludes.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/getUsageFromReadme.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/index.d.ts +0 -28
- package/lib/shared/options/createOptionDefaults/index.js +0 -49
- package/lib/shared/options/createOptionDefaults/index.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/parsePackageAuthor.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/readDefaultsFromReadme.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/readEmails.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/readFunding.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/readGitHubEmail.js.map +0 -1
- package/lib/shared/options/createOptionDefaults/readGuide.js.map +0 -1
- package/lib/shared/options/createRepositoryWithApi.d.ts +0 -10
- package/lib/shared/options/createRepositoryWithApi.js +0 -32
- package/lib/shared/options/createRepositoryWithApi.js.map +0 -1
- package/lib/shared/options/detectEmailRedundancy.d.ts +0 -8
- package/lib/shared/options/detectEmailRedundancy.js +0 -16
- package/lib/shared/options/detectEmailRedundancy.js.map +0 -1
- package/lib/shared/options/ensureRepositoryExists.d.ts +0 -13
- package/lib/shared/options/ensureRepositoryExists.js +0 -64
- package/lib/shared/options/ensureRepositoryExists.js.map +0 -1
- package/lib/shared/options/exclusionKeys.d.ts +0 -15
- package/lib/shared/options/exclusionKeys.js +0 -129
- package/lib/shared/options/exclusionKeys.js.map +0 -1
- package/lib/shared/options/getBase.d.ts +0 -7
- package/lib/shared/options/getBase.js +0 -27
- package/lib/shared/options/getBase.js.map +0 -1
- package/lib/shared/options/getPrefillOrPromptedOption.d.ts +0 -16
- package/lib/shared/options/getPrefillOrPromptedOption.js +0 -37
- package/lib/shared/options/getPrefillOrPromptedOption.js.map +0 -1
- package/lib/shared/options/logInferredOptions.d.ts +0 -8
- package/lib/shared/options/logInferredOptions.js +0 -30
- package/lib/shared/options/logInferredOptions.js.map +0 -1
- package/lib/shared/options/optionsSchema.d.ts +0 -218
- package/lib/shared/options/optionsSchema.js +0 -63
- package/lib/shared/options/optionsSchema.js.map +0 -1
- package/lib/shared/options/readLogoSizing.js.map +0 -1
- package/lib/shared/options/readOptions.d.ts +0 -21
- package/lib/shared/options/readOptions.js +0 -235
- package/lib/shared/options/readOptions.js.map +0 -1
- package/lib/shared/packages.d.ts +0 -8
- package/lib/shared/packages.js +0 -18
- package/lib/shared/packages.js.map +0 -1
- package/lib/shared/prompts.d.ts +0 -3
- package/lib/shared/prompts.js +0 -8
- package/lib/shared/prompts.js.map +0 -1
- package/lib/shared/readFileAsJson.js.map +0 -1
- package/lib/shared/readFileSafe.js.map +0 -1
- package/lib/shared/readFileSafeAsJson.d.ts +0 -3
- package/lib/shared/readFileSafeAsJson.js +0 -8
- package/lib/shared/readFileSafeAsJson.js.map +0 -1
- package/lib/shared/runOrRestore.d.ts +0 -7
- package/lib/shared/runOrRestore.js +0 -37
- package/lib/shared/runOrRestore.js.map +0 -1
- package/lib/shared/tryCatchAsync.js.map +0 -1
- package/lib/shared/tryCatchLazyValueAsync.js.map +0 -1
- package/lib/shared/types.d.ts +0 -120
- package/lib/shared/types.js +0 -1
- package/lib/shared/types.js.map +0 -1
- package/lib/steps/addOwnerAsAllContributor.d.ts +0 -8
- package/lib/steps/addOwnerAsAllContributor.js +0 -43
- package/lib/steps/addOwnerAsAllContributor.js.map +0 -1
- package/lib/steps/addToolAllContributors.d.ts +0 -8
- package/lib/steps/addToolAllContributors.js +0 -12
- package/lib/steps/addToolAllContributors.js.map +0 -1
- package/lib/steps/clearChangelog.d.ts +0 -3
- package/lib/steps/clearChangelog.js +0 -12
- package/lib/steps/clearChangelog.js.map +0 -1
- package/lib/steps/clearLocalGitTags.d.ts +0 -3
- package/lib/steps/clearLocalGitTags.js +0 -9
- package/lib/steps/clearLocalGitTags.js.map +0 -1
- package/lib/steps/clearUnnecessaryFiles.d.ts +0 -3
- package/lib/steps/clearUnnecessaryFiles.js +0 -38
- package/lib/steps/clearUnnecessaryFiles.js.map +0 -1
- package/lib/steps/createJoshuaKGoldbergReplacement.d.ts +0 -11
- package/lib/steps/createJoshuaKGoldbergReplacement.js +0 -16
- package/lib/steps/createJoshuaKGoldbergReplacement.js.map +0 -1
- package/lib/steps/finalizeDependencies.d.ts +0 -7
- package/lib/steps/finalizeDependencies.js +0 -59
- package/lib/steps/finalizeDependencies.js.map +0 -1
- package/lib/steps/initializeGitHubRepository/index.d.ts +0 -8
- package/lib/steps/initializeGitHubRepository/index.js +0 -19
- package/lib/steps/initializeGitHubRepository/index.js.map +0 -1
- package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.d.ts +0 -8
- package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.js +0 -67
- package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.js.map +0 -1
- package/lib/steps/initializeGitHubRepository/outcomeLabels.js.map +0 -1
- package/lib/steps/initializeGitRemote.d.ts +0 -8
- package/lib/steps/initializeGitRemote.js +0 -15
- package/lib/steps/initializeGitRemote.js.map +0 -1
- package/lib/steps/initializeRepositorySettings.d.ts +0 -9
- package/lib/steps/initializeRepositorySettings.js +0 -27
- package/lib/steps/initializeRepositorySettings.js.map +0 -1
- package/lib/steps/populateCSpellDictionary.d.ts +0 -3
- package/lib/steps/populateCSpellDictionary.js +0 -36
- package/lib/steps/populateCSpellDictionary.js.map +0 -1
- package/lib/steps/removeSetupScripts.d.ts +0 -3
- package/lib/steps/removeSetupScripts.js +0 -29
- package/lib/steps/removeSetupScripts.js.map +0 -1
- package/lib/steps/resetGitTags.d.ts +0 -3
- package/lib/steps/resetGitTags.js +0 -12
- package/lib/steps/resetGitTags.js.map +0 -1
- package/lib/steps/runCleanup.d.ts +0 -7
- package/lib/steps/runCleanup.js +0 -37
- package/lib/steps/runCleanup.js.map +0 -1
- package/lib/steps/uninstallPackages.d.ts +0 -3
- package/lib/steps/uninstallPackages.js +0 -64
- package/lib/steps/uninstallPackages.js.map +0 -1
- package/lib/steps/updateAllContributorsTable.d.ts +0 -7
- package/lib/steps/updateAllContributorsTable.js +0 -24
- package/lib/steps/updateAllContributorsTable.js.map +0 -1
- package/lib/steps/updateLocalFiles.d.ts +0 -7
- package/lib/steps/updateLocalFiles.js +0 -84
- package/lib/steps/updateLocalFiles.js.map +0 -1
- package/lib/steps/updateReadme.d.ts +0 -10
- package/lib/steps/updateReadme.js +0 -27
- package/lib/steps/updateReadme.js.map +0 -1
- package/lib/steps/writeReadme/findExistingBadges.d.ts +0 -4
- package/lib/steps/writeReadme/findExistingBadges.js +0 -28
- package/lib/steps/writeReadme/findExistingBadges.js.map +0 -1
- package/lib/steps/writeReadme/findIntroSectionClose.d.ts +0 -3
- package/lib/steps/writeReadme/findIntroSectionClose.js +0 -22
- package/lib/steps/writeReadme/findIntroSectionClose.js.map +0 -1
- package/lib/steps/writeReadme/generateTopContent.d.ts +0 -7
- package/lib/steps/writeReadme/generateTopContent.js +0 -70
- package/lib/steps/writeReadme/generateTopContent.js.map +0 -1
- package/lib/steps/writeReadme/index.d.ts +0 -7
- package/lib/steps/writeReadme/index.js +0 -57
- package/lib/steps/writeReadme/index.js.map +0 -1
- package/lib/steps/writing/creation/createCSpellConfig.d.ts +0 -7
- package/lib/steps/writing/creation/createCSpellConfig.js +0 -27
- package/lib/steps/writing/creation/createCSpellConfig.js.map +0 -1
- package/lib/steps/writing/creation/createDotGitignore.d.ts +0 -7
- package/lib/steps/writing/creation/createDotGitignore.js +0 -14
- package/lib/steps/writing/creation/createDotGitignore.js.map +0 -1
- package/lib/steps/writing/creation/createESLintConfig.d.ts +0 -7
- package/lib/steps/writing/creation/createESLintConfig.js +0 -105
- package/lib/steps/writing/creation/createESLintConfig.js.map +0 -1
- package/lib/steps/writing/creation/createKnipConfig.d.ts +0 -3
- package/lib/steps/writing/creation/createKnipConfig.js +0 -20
- package/lib/steps/writing/creation/createKnipConfig.js.map +0 -1
- package/lib/steps/writing/creation/createTsupConfig.d.ts +0 -7
- package/lib/steps/writing/creation/createTsupConfig.js +0 -19
- package/lib/steps/writing/creation/createTsupConfig.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/actions.d.ts +0 -7
- package/lib/steps/writing/creation/dotGitHub/actions.js +0 -32
- package/lib/steps/writing/creation/dotGitHub/actions.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.d.ts +0 -7
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.js +0 -154
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/index.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/splitIntoSections.d.ts +0 -3
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/splitIntoSections.js +0 -24
- package/lib/steps/writing/creation/dotGitHub/createDevelopment/splitIntoSections.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.d.ts +0 -16
- package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js +0 -292
- package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createMultiWorkflowFile.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createSoloWorkflowFile.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.d.ts +0 -15
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.js +0 -237
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/formatWorkflowYaml.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/index.d.ts +0 -36
- package/lib/steps/writing/creation/dotGitHub/index.js +0 -16
- package/lib/steps/writing/creation/dotGitHub/index.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/issueTemplate.d.ts +0 -12
- package/lib/steps/writing/creation/dotGitHub/issueTemplate.js +0 -198
- package/lib/steps/writing/creation/dotGitHub/issueTemplate.js.map +0 -1
- package/lib/steps/writing/creation/dotHusky.d.ts +0 -6
- package/lib/steps/writing/creation/dotHusky.js +0 -11
- package/lib/steps/writing/creation/dotHusky.js.map +0 -1
- package/lib/steps/writing/creation/dotVSCode.d.ts +0 -12
- package/lib/steps/writing/creation/dotVSCode.js +0 -79
- package/lib/steps/writing/creation/dotVSCode.js.map +0 -1
- package/lib/steps/writing/creation/formatters/formatIgnoreFile.js.map +0 -1
- package/lib/steps/writing/creation/formatters/formatJson.d.ts +0 -3
- package/lib/steps/writing/creation/formatters/formatJson.js +0 -18
- package/lib/steps/writing/creation/formatters/formatJson.js.map +0 -1
- package/lib/steps/writing/creation/formatters/formatTypeScript.d.ts +0 -3
- package/lib/steps/writing/creation/formatters/formatTypeScript.js +0 -8
- package/lib/steps/writing/creation/formatters/formatTypeScript.js.map +0 -1
- package/lib/steps/writing/creation/formatters/formatYaml.js.map +0 -1
- package/lib/steps/writing/creation/index.d.ts +0 -9
- package/lib/steps/writing/creation/index.js +0 -78
- package/lib/steps/writing/creation/index.js.map +0 -1
- package/lib/steps/writing/creation/rootFiles.d.ts +0 -24
- package/lib/steps/writing/creation/rootFiles.js +0 -152
- package/lib/steps/writing/creation/rootFiles.js.map +0 -1
- package/lib/steps/writing/creation/src.d.ts +0 -12
- package/lib/steps/writing/creation/src.js +0 -90
- package/lib/steps/writing/creation/src.js.map +0 -1
- package/lib/steps/writing/creation/writeAllContributorsRC.d.ts +0 -7
- package/lib/steps/writing/creation/writeAllContributorsRC.js +0 -18
- package/lib/steps/writing/creation/writeAllContributorsRC.js.map +0 -1
- package/lib/steps/writing/creation/writePackageJson.d.ts +0 -7
- package/lib/steps/writing/creation/writePackageJson.js +0 -118
- package/lib/steps/writing/creation/writePackageJson.js.map +0 -1
- package/lib/steps/writing/types.d.ts +0 -5
- package/lib/steps/writing/types.js +0 -1
- package/lib/steps/writing/types.js.map +0 -1
- package/lib/steps/writing/writeStructure.d.ts +0 -7
- package/lib/steps/writing/writeStructure.js +0 -22
- package/lib/steps/writing/writeStructure.js.map +0 -1
- package/lib/steps/writing/writeStructureWorker.d.ts +0 -5
- package/lib/steps/writing/writeStructureWorker.js +0 -47
- package/lib/steps/writing/writeStructureWorker.js.map +0 -1
- /package/lib/{next/blocks → blocks}/blockAreTheTypesWrong.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintComments.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintJSDoc.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintJSONC.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintMarkdown.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintMoreStyling.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintPackageJson.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintPerfectionist.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintRegexp.js +0 -0
- /package/lib/{next/blocks → blocks}/blockESLintYML.js +0 -0
- /package/lib/{next/blocks → blocks}/blockExampleFiles.js +0 -0
- /package/lib/{next/blocks → blocks}/blockGitHubApps.js +0 -0
- /package/lib/{next/blocks → blocks}/blockGitHubPRTemplate.js +0 -0
- /package/lib/{next/blocks → blocks}/blockMITLicense.js +0 -0
- /package/lib/{next/blocks → blocks}/blockNvmrc.js +0 -0
- /package/lib/{next/blocks → blocks}/blockPnpmDedupe.js +0 -0
- /package/lib/{next/blocks → blocks}/blockPrettierPluginCurly.js +0 -0
- /package/lib/{next/blocks → blocks}/blockPrettierPluginPackageJson.js +0 -0
- /package/lib/{next/blocks → blocks}/blockPrettierPluginSh.js +0 -0
- /package/lib/{next/blocks → blocks}/blockRepositorySecrets.js +0 -0
- /package/lib/{next/blocks → blocks}/blockRepositorySettings.js +0 -0
- /package/lib/{next/blocks → blocks}/blockSecurityDocs.js +0 -0
- /package/lib/{next/blocks → blocks}/blockVSCode.js +0 -0
- /package/lib/{steps/writing/creation/dotGitHub → blocks/files}/createMultiWorkflowFile.d.ts +0 -0
- /package/lib/{steps/writing/creation/dotGitHub → blocks/files}/createSoloWorkflowFile.d.ts +0 -0
- /package/lib/{steps/writing/creation/formatters → blocks/files}/formatIgnoreFile.d.ts +0 -0
- /package/lib/{steps/writing/creation/formatters → blocks/files}/formatIgnoreFile.js +0 -0
- /package/lib/{steps/writing/creation/dotGitHub → blocks/files}/formatWorkflowYaml.d.ts +0 -0
- /package/lib/{steps/writing/creation/formatters → blocks/files}/formatYaml.d.ts +0 -0
- /package/lib/{next/blocks → blocks}/options.fakes.d.ts +0 -0
- /package/lib/{next/blocks → blocks}/options.fakes.js +0 -0
- /package/lib/{steps/initializeGitHubRepository → blocks}/outcomeLabels.d.ts +0 -0
- /package/lib/{next/blocks → blocks}/phases.d.ts +0 -0
- /package/lib/{next/blocks → blocks}/phases.js +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/getUsageFromReadme.d.ts +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/getUsageFromReadme.js +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/parsePackageAuthor.js +0 -0
- /package/lib/{next → options}/readDescriptionFromReadme.d.ts +0 -0
- /package/lib/{next → options}/readDescriptionFromReadme.js +0 -0
- /package/lib/{next → options}/readDocumentation.d.ts +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/readEmails.d.ts +0 -0
- /package/lib/{shared → options}/readFileAsJson.d.ts +0 -0
- /package/lib/{shared → options}/readFileAsJson.js +0 -0
- /package/lib/{shared → options}/readFileSafe.d.ts +0 -0
- /package/lib/{shared → options}/readFileSafe.js +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/readFunding.d.ts +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/readGitHubEmail.d.ts +0 -0
- /package/lib/{shared/options/createOptionDefaults → options}/readGuide.d.ts +0 -0
- /package/lib/{shared/options → options}/readLogoSizing.d.ts +0 -0
- /package/lib/{next/utils → utils}/resolveBin.d.ts +0 -0
- /package/lib/{next/utils → utils}/resolveBin.js +0 -0
- /package/lib/{next/utils → utils}/sortObject.d.ts +0 -0
- /package/lib/{next/utils → utils}/sortObject.js +0 -0
- /package/lib/{next/utils → utils}/swallowError.d.ts +0 -0
- /package/lib/{next/utils → utils}/swallowError.js +0 -0
- /package/lib/{shared → utils}/tryCatchAsync.d.ts +0 -0
- /package/lib/{shared → utils}/tryCatchAsync.js +0 -0
- /package/lib/{shared → utils}/tryCatchLazyValueAsync.d.ts +0 -0
- /package/lib/{shared → utils}/tryCatchLazyValueAsync.js +0 -0
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { formatJson } from "./formatters/formatJson.js";
|
|
2
|
-
async function createDotVSCode(options) {
|
|
3
|
-
return {
|
|
4
|
-
"extensions.json": await formatJson({
|
|
5
|
-
recommendations: [
|
|
6
|
-
!options.excludeLintMd && "DavidAnson.vscode-markdownlint",
|
|
7
|
-
"dbaeumer.vscode-eslint",
|
|
8
|
-
"esbenp.prettier-vscode",
|
|
9
|
-
!options.excludeLintSpelling && "streetsidesoftware.code-spell-checker",
|
|
10
|
-
!options.excludeTests && "vitest.explorer"
|
|
11
|
-
].filter(Boolean)
|
|
12
|
-
}),
|
|
13
|
-
...options.excludeTests && !options.bin ? {} : {
|
|
14
|
-
"launch.json": await formatJson({
|
|
15
|
-
configurations: [
|
|
16
|
-
...options.excludeTests ? [] : [
|
|
17
|
-
{
|
|
18
|
-
args: ["run", "${relativeFile}"],
|
|
19
|
-
autoAttachChildProcesses: true,
|
|
20
|
-
console: "integratedTerminal",
|
|
21
|
-
name: "Debug Current Test File",
|
|
22
|
-
program: "${workspaceRoot}/node_modules/vitest/vitest.mjs",
|
|
23
|
-
request: "launch",
|
|
24
|
-
skipFiles: ["<node_internals>/**", "**/node_modules/**"],
|
|
25
|
-
smartStep: true,
|
|
26
|
-
type: "node"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
...options.bin ? [
|
|
30
|
-
{
|
|
31
|
-
name: "Debug Program",
|
|
32
|
-
preLaunchTask: "build",
|
|
33
|
-
program: options.bin,
|
|
34
|
-
request: "launch",
|
|
35
|
-
skipFiles: ["<node_internals>/**"],
|
|
36
|
-
type: "node"
|
|
37
|
-
}
|
|
38
|
-
] : []
|
|
39
|
-
],
|
|
40
|
-
version: "0.2.0"
|
|
41
|
-
})
|
|
42
|
-
},
|
|
43
|
-
"settings.json": await formatJson({
|
|
44
|
-
"editor.codeActionsOnSave": {
|
|
45
|
-
"source.fixAll.eslint": "explicit"
|
|
46
|
-
},
|
|
47
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
48
|
-
"editor.formatOnSave": true,
|
|
49
|
-
"editor.rulers": [80],
|
|
50
|
-
"eslint.probe": [
|
|
51
|
-
"javascript",
|
|
52
|
-
"javascriptreact",
|
|
53
|
-
"json",
|
|
54
|
-
"jsonc",
|
|
55
|
-
"markdown",
|
|
56
|
-
"typescript",
|
|
57
|
-
"typescriptreact",
|
|
58
|
-
"yaml"
|
|
59
|
-
],
|
|
60
|
-
"eslint.rules.customizations": [{ rule: "*", severity: "warn" }],
|
|
61
|
-
"typescript.tsdk": "node_modules/typescript/lib"
|
|
62
|
-
}),
|
|
63
|
-
"tasks.json": await formatJson({
|
|
64
|
-
tasks: [
|
|
65
|
-
{
|
|
66
|
-
detail: "Build the project",
|
|
67
|
-
label: "build",
|
|
68
|
-
script: "build",
|
|
69
|
-
type: "npm"
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
version: "2.0.0"
|
|
73
|
-
})
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
export {
|
|
77
|
-
createDotVSCode
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=dotVSCode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/dotVSCode.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\n\n/* spellchecker: disable */\nexport async function createDotVSCode(options: Options) {\n\treturn {\n\t\t\"extensions.json\": await formatJson({\n\t\t\trecommendations: [\n\t\t\t\t!options.excludeLintMd && \"DavidAnson.vscode-markdownlint\",\n\t\t\t\t\"dbaeumer.vscode-eslint\",\n\t\t\t\t\"esbenp.prettier-vscode\",\n\t\t\t\t!options.excludeLintSpelling && \"streetsidesoftware.code-spell-checker\",\n\t\t\t\t!options.excludeTests && \"vitest.explorer\",\n\t\t\t].filter(Boolean),\n\t\t}),\n\t\t...(options.excludeTests && !options.bin\n\t\t\t? {}\n\t\t\t: {\n\t\t\t\t\t\"launch.json\": await formatJson({\n\t\t\t\t\t\tconfigurations: [\n\t\t\t\t\t\t\t...(options.excludeTests\n\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\targs: [\"run\", \"${relativeFile}\"],\n\t\t\t\t\t\t\t\t\t\t\tautoAttachChildProcesses: true,\n\t\t\t\t\t\t\t\t\t\t\tconsole: \"integratedTerminal\",\n\t\t\t\t\t\t\t\t\t\t\tname: \"Debug Current Test File\",\n\t\t\t\t\t\t\t\t\t\t\tprogram:\n\t\t\t\t\t\t\t\t\t\t\t\t\"${workspaceRoot}/node_modules/vitest/vitest.mjs\",\n\t\t\t\t\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\", \"**/node_modules/**\"],\n\t\t\t\t\t\t\t\t\t\t\tsmartStep: true,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"node\",\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t]),\n\t\t\t\t\t\t\t...(options.bin\n\t\t\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tname: \"Debug Program\",\n\t\t\t\t\t\t\t\t\t\t\tpreLaunchTask: \"build\",\n\t\t\t\t\t\t\t\t\t\t\tprogram: options.bin,\n\t\t\t\t\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\"],\n\t\t\t\t\t\t\t\t\t\t\ttype: \"node\",\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t: []),\n\t\t\t\t\t\t],\n\t\t\t\t\t\tversion: \"0.2.0\",\n\t\t\t\t\t}),\n\t\t\t\t}),\n\t\t\"settings.json\": await formatJson({\n\t\t\t\"editor.codeActionsOnSave\": {\n\t\t\t\t\"source.fixAll.eslint\": \"explicit\",\n\t\t\t},\n\t\t\t\"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n\t\t\t\"editor.formatOnSave\": true,\n\t\t\t\"editor.rulers\": [80],\n\t\t\t\"eslint.probe\": [\n\t\t\t\t\"javascript\",\n\t\t\t\t\"javascriptreact\",\n\t\t\t\t\"json\",\n\t\t\t\t\"jsonc\",\n\t\t\t\t\"markdown\",\n\t\t\t\t\"typescript\",\n\t\t\t\t\"typescriptreact\",\n\t\t\t\t\"yaml\",\n\t\t\t],\n\t\t\t\"eslint.rules.customizations\": [{ rule: \"*\", severity: \"warn\" }],\n\t\t\t\"typescript.tsdk\": \"node_modules/typescript/lib\",\n\t\t}),\n\t\t\"tasks.json\": await formatJson({\n\t\t\ttasks: [\n\t\t\t\t{\n\t\t\t\t\tdetail: \"Build the project\",\n\t\t\t\t\tlabel: \"build\",\n\t\t\t\t\tscript: \"build\",\n\t\t\t\t\ttype: \"npm\",\n\t\t\t\t},\n\t\t\t],\n\t\t\tversion: \"2.0.0\",\n\t\t}),\n\t};\n}\n"],"mappings":"AACA,SAAS,kBAAkB;AAG3B,eAAsB,gBAAgB,SAAkB;AACvD,SAAO;AAAA,IACN,mBAAmB,MAAM,WAAW;AAAA,MACnC,iBAAiB;AAAA,QAChB,CAAC,QAAQ,iBAAiB;AAAA,QAC1B;AAAA,QACA;AAAA,QACA,CAAC,QAAQ,uBAAuB;AAAA,QAChC,CAAC,QAAQ,gBAAgB;AAAA,MAC1B,EAAE,OAAO,OAAO;AAAA,IACjB,CAAC;AAAA,IACD,GAAI,QAAQ,gBAAgB,CAAC,QAAQ,MAClC,CAAC,IACD;AAAA,MACA,eAAe,MAAM,WAAW;AAAA,QAC/B,gBAAgB;AAAA,UACf,GAAI,QAAQ,eACT,CAAC,IACD;AAAA,YACA;AAAA,cACC,MAAM,CAAC,OAAO,iBAAiB;AAAA,cAC/B,0BAA0B;AAAA,cAC1B,SAAS;AAAA,cACT,MAAM;AAAA,cACN,SACC;AAAA,cACD,SAAS;AAAA,cACT,WAAW,CAAC,uBAAuB,oBAAoB;AAAA,cACvD,WAAW;AAAA,cACX,MAAM;AAAA,YACP;AAAA,UACD;AAAA,UACF,GAAI,QAAQ,MACT;AAAA,YACA;AAAA,cACC,MAAM;AAAA,cACN,eAAe;AAAA,cACf,SAAS,QAAQ;AAAA,cACjB,SAAS;AAAA,cACT,WAAW,CAAC,qBAAqB;AAAA,cACjC,MAAM;AAAA,YACP;AAAA,UACD,IACC,CAAC;AAAA,QACL;AAAA,QACA,SAAS;AAAA,MACV,CAAC;AAAA,IACF;AAAA,IACF,iBAAiB,MAAM,WAAW;AAAA,MACjC,4BAA4B;AAAA,QAC3B,wBAAwB;AAAA,MACzB;AAAA,MACA,2BAA2B;AAAA,MAC3B,uBAAuB;AAAA,MACvB,iBAAiB,CAAC,EAAE;AAAA,MACpB,gBAAgB;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MACA,+BAA+B,CAAC,EAAE,MAAM,KAAK,UAAU,OAAO,CAAC;AAAA,MAC/D,mBAAmB;AAAA,IACpB,CAAC;AAAA,IACD,cAAc,MAAM,WAAW;AAAA,MAC9B,OAAO;AAAA,QACN;AAAA,UACC,QAAQ;AAAA,UACR,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,MAAM;AAAA,QACP;AAAA,MACD;AAAA,MACA,SAAS;AAAA,IACV,CAAC;AAAA,EACF;AACD;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/steps/writing/creation/formatters/formatIgnoreFile.ts"],"sourcesContent":["export function formatIgnoreFile(lines: (string | undefined)[]) {\n\treturn [...lines.filter(Boolean), \"\"].join(\"\\n\");\n}\n"],"mappings":"AAAO,SAAS,iBAAiB,OAA+B;AAC/D,SAAO,CAAC,GAAG,MAAM,OAAO,OAAO,GAAG,EAAE,EAAE,KAAK,IAAI;AAChD;","names":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import prettier from "prettier";
|
|
2
|
-
async function formatJson(value) {
|
|
3
|
-
return await prettier.format(
|
|
4
|
-
JSON.stringify(
|
|
5
|
-
Object.fromEntries(
|
|
6
|
-
Object.entries(value).filter((entry) => entry[1] !== void 0)
|
|
7
|
-
)
|
|
8
|
-
),
|
|
9
|
-
{
|
|
10
|
-
parser: "json",
|
|
11
|
-
useTabs: true
|
|
12
|
-
}
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
formatJson
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=formatJson.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/steps/writing/creation/formatters/formatJson.ts"],"sourcesContent":["import prettier from \"prettier\";\n\nexport async function formatJson(value: object) {\n\treturn await prettier.format(\n\t\tJSON.stringify(\n\t\t\tObject.fromEntries(\n\t\t\t\tObject.entries(value).filter((entry) => entry[1] !== undefined),\n\t\t\t),\n\t\t),\n\t\t{\n\t\t\tparser: \"json\",\n\t\t\tuseTabs: true,\n\t\t},\n\t);\n}\n"],"mappings":"AAAA,OAAO,cAAc;AAErB,eAAsB,WAAW,OAAe;AAC/C,SAAO,MAAM,SAAS;AAAA,IACrB,KAAK;AAAA,MACJ,OAAO;AAAA,QACN,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,UAAU,MAAM,CAAC,MAAM,MAAS;AAAA,MAC/D;AAAA,IACD;AAAA,IACA;AAAA,MACC,QAAQ;AAAA,MACR,SAAS;AAAA,IACV;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/steps/writing/creation/formatters/formatTypeScript.ts"],"sourcesContent":["import prettier from \"prettier\";\n\nexport async function formatTypeScript(value: string) {\n\treturn await prettier.format(value, { parser: \"typescript\", useTabs: true });\n}\n"],"mappings":"AAAA,OAAO,cAAc;AAErB,eAAsB,iBAAiB,OAAe;AACrD,SAAO,MAAM,SAAS,OAAO,OAAO,EAAE,QAAQ,cAAc,SAAS,KAAK,CAAC;AAC5E;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/steps/writing/creation/formatters/formatYaml.ts"],"sourcesContent":["import prettier from \"@prettier/sync\";\nimport jsYaml from \"js-yaml\";\n\nconst options: jsYaml.DumpOptions = {\n\tlineWidth: -1,\n\tnoCompatMode: true,\n\t// https://github.com/nodeca/js-yaml/pull/515\n\treplacer(_, value: unknown) {\n\t\tif (typeof value !== \"string\" || !value.includes(\"\\n\\t\\t\")) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn value\n\t\t\t.replaceAll(\": |-\\n\", \": |\\n\")\n\t\t\t.replaceAll(\"\\n\\t \\t\\t\\t\", \"\")\n\t\t\t.replaceAll(/\\n\\t\\t\\t\\t\\t\\t$/g, \"\");\n\t},\n\tsortKeys: true,\n\tstyles: {\n\t\t\"!!null\": \"canonical\",\n\t},\n};\n\nexport function formatYaml(value: unknown) {\n\tconst dumped = jsYaml.dump(value, options);\n\treturn prettier.format(dumped, { parser: \"yaml\" });\n}\n"],"mappings":"AAAA,OAAO,cAAc;AACrB,OAAO,YAAY;AAEnB,MAAM,UAA8B;AAAA,EACnC,WAAW;AAAA,EACX,cAAc;AAAA;AAAA,EAEd,SAAS,GAAG,OAAgB;AAC3B,QAAI,OAAO,UAAU,YAAY,CAAC,MAAM,SAAS,MAAQ,GAAG;AAC3D,aAAO;AAAA,IACR;AAEA,WAAO,MACL,WAAW,UAAU,OAAO,EAC5B,WAAW,YAAgB,EAAE,EAC7B,WAAW,oBAAoB,EAAE;AAAA,EACpC;AAAA,EACA,UAAU;AAAA,EACV,QAAQ;AAAA,IACP,UAAU;AAAA,EACX;AACD;AAEO,SAAS,WAAW,OAAgB;AAC1C,QAAM,SAAS,OAAO,KAAK,OAAO,OAAO;AACzC,SAAO,SAAS,OAAO,QAAQ,EAAE,QAAQ,OAAO,CAAC;AAClD;","names":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SystemFetchers } from 'create';
|
|
2
|
-
import { Options } from '../../../shared/types.js';
|
|
3
|
-
import { Structure } from '../types.js';
|
|
4
|
-
import 'zod';
|
|
5
|
-
import '../../../shared/codes.js';
|
|
6
|
-
|
|
7
|
-
declare function createStructure(providedOptions: Options, useNextEngine: boolean, fetchers?: SystemFetchers): Promise<Structure>;
|
|
8
|
-
|
|
9
|
-
export { createStructure };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
produceBase,
|
|
3
|
-
producePreset
|
|
4
|
-
} from "create";
|
|
5
|
-
import prettier from "prettier";
|
|
6
|
-
import { presetCommon } from "../../../next/presets/presetCommon.js";
|
|
7
|
-
import { presetEverything } from "../../../next/presets/presetEverything.js";
|
|
8
|
-
import { presetMinimal } from "../../../next/presets/presetMinimal.js";
|
|
9
|
-
import { createDotGitHub } from "./dotGitHub/index.js";
|
|
10
|
-
import { createDotHusky } from "./dotHusky.js";
|
|
11
|
-
import { createDotVSCode } from "./dotVSCode.js";
|
|
12
|
-
import { createRootFiles } from "./rootFiles.js";
|
|
13
|
-
import { createSrc } from "./src.js";
|
|
14
|
-
const presets = {
|
|
15
|
-
common: presetCommon,
|
|
16
|
-
everything: presetEverything,
|
|
17
|
-
minimal: presetMinimal
|
|
18
|
-
};
|
|
19
|
-
async function createStructure(providedOptions, useNextEngine, fetchers) {
|
|
20
|
-
const preset = useNextEngine && providedOptions.base && providedOptions.base !== "prompt" && presets[providedOptions.base];
|
|
21
|
-
if (preset) {
|
|
22
|
-
const options = {
|
|
23
|
-
...await produceBase(preset.base, {
|
|
24
|
-
fetchers,
|
|
25
|
-
options: providedOptions
|
|
26
|
-
}),
|
|
27
|
-
...providedOptions
|
|
28
|
-
};
|
|
29
|
-
const creation = await producePreset(preset, {
|
|
30
|
-
fetchers,
|
|
31
|
-
mode: "initialize",
|
|
32
|
-
options
|
|
33
|
-
});
|
|
34
|
-
return await recursivelyFormat(creation.files);
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
".github": await createDotGitHub(providedOptions),
|
|
38
|
-
".husky": createDotHusky(),
|
|
39
|
-
".vscode": await createDotVSCode(providedOptions),
|
|
40
|
-
...providedOptions.mode !== "migrate" && {
|
|
41
|
-
src: await createSrc(providedOptions)
|
|
42
|
-
},
|
|
43
|
-
...await createRootFiles(providedOptions)
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
async function recursivelyFormat(files) {
|
|
47
|
-
const result = {};
|
|
48
|
-
for (const [key, value] of Object.entries(files)) {
|
|
49
|
-
if (Array.isArray(value)) {
|
|
50
|
-
result[key] = await formatCreatedFile(key, value[0]);
|
|
51
|
-
} else if (typeof value === "string") {
|
|
52
|
-
result[key] = await formatCreatedFile(key, value);
|
|
53
|
-
} else if (typeof value === "object") {
|
|
54
|
-
result[key] = await recursivelyFormat(value);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return result;
|
|
58
|
-
}
|
|
59
|
-
const asYaml = /* @__PURE__ */ new Set([
|
|
60
|
-
".gitignore",
|
|
61
|
-
".markdownlintignore",
|
|
62
|
-
".nvmrc",
|
|
63
|
-
".prettierignore",
|
|
64
|
-
"pre-commit"
|
|
65
|
-
]);
|
|
66
|
-
async function formatCreatedFile(filepath, entry) {
|
|
67
|
-
if (filepath.endsWith(".yml")) {
|
|
68
|
-
return entry;
|
|
69
|
-
}
|
|
70
|
-
return await prettier.format(entry, {
|
|
71
|
-
useTabs: true,
|
|
72
|
-
...asYaml.has(filepath) ? { parser: "yaml" } : { filepath }
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
export {
|
|
76
|
-
createStructure
|
|
77
|
-
};
|
|
78
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/index.ts"],"sourcesContent":["import {\n\tCreatedFiles,\n\tproduceBase,\n\tproducePreset,\n\tSystemFetchers,\n} from \"create\";\nimport prettier from \"prettier\";\n\nimport { presetCommon } from \"../../../next/presets/presetCommon.js\";\nimport { presetEverything } from \"../../../next/presets/presetEverything.js\";\nimport { presetMinimal } from \"../../../next/presets/presetMinimal.js\";\nimport { Options } from \"../../../shared/types.js\";\nimport { Structure } from \"../types.js\";\nimport { createDotGitHub } from \"./dotGitHub/index.js\";\nimport { createDotHusky } from \"./dotHusky.js\";\nimport { createDotVSCode } from \"./dotVSCode.js\";\nimport { createRootFiles } from \"./rootFiles.js\";\nimport { createSrc } from \"./src.js\";\n\nconst presets = {\n\tcommon: presetCommon,\n\teverything: presetEverything,\n\tminimal: presetMinimal,\n};\n\nexport async function createStructure(\n\tprovidedOptions: Options,\n\tuseNextEngine: boolean,\n\tfetchers?: SystemFetchers,\n): Promise<Structure> {\n\tconst preset =\n\t\tuseNextEngine &&\n\t\tprovidedOptions.base &&\n\t\tprovidedOptions.base !== \"prompt\" &&\n\t\tpresets[providedOptions.base];\n\n\tif (preset) {\n\t\tconst options = {\n\t\t\t...(await produceBase(preset.base, {\n\t\t\t\tfetchers,\n\t\t\t\toptions: providedOptions,\n\t\t\t})),\n\t\t\t...providedOptions,\n\t\t};\n\t\tconst creation = await producePreset(preset, {\n\t\t\tfetchers,\n\t\t\tmode: \"initialize\",\n\t\t\toptions,\n\t\t});\n\n\t\treturn await recursivelyFormat(creation.files);\n\t}\n\n\treturn {\n\t\t\".github\": await createDotGitHub(providedOptions),\n\t\t\".husky\": createDotHusky(),\n\t\t\".vscode\": await createDotVSCode(providedOptions),\n\t\t...(providedOptions.mode !== \"migrate\" && {\n\t\t\tsrc: await createSrc(providedOptions),\n\t\t}),\n\t\t...(await createRootFiles(providedOptions)),\n\t};\n}\n\nasync function recursivelyFormat(files: CreatedFiles): Promise<Structure> {\n\tconst result: Structure = {};\n\n\tfor (const [key, value] of Object.entries(files)) {\n\t\tif (Array.isArray(value)) {\n\t\t\tresult[key] = await formatCreatedFile(key, value[0]);\n\t\t} else if (typeof value === \"string\") {\n\t\t\tresult[key] = await formatCreatedFile(key, value);\n\t\t} else if (typeof value === \"object\") {\n\t\t\tresult[key] = await recursivelyFormat(value);\n\t\t}\n\t}\n\n\treturn result;\n}\n\nconst asYaml = new Set([\n\t\".gitignore\",\n\t\".markdownlintignore\",\n\t\".nvmrc\",\n\t\".prettierignore\",\n\t\"pre-commit\",\n]);\n\nasync function formatCreatedFile(filepath: string, entry: string) {\n\t// For now, explicit yml files internally already have formatting applied\n\tif (filepath.endsWith(\".yml\")) {\n\t\treturn entry;\n\t}\n\n\treturn await prettier.format(entry, {\n\t\tuseTabs: true,\n\t\t...(asYaml.has(filepath) ? { parser: \"yaml\" } : { filepath }),\n\t});\n}\n"],"mappings":"AAAA;AAAA,EAEC;AAAA,EACA;AAAA,OAEM;AACP,OAAO,cAAc;AAErB,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,qBAAqB;AAG9B,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAE1B,MAAM,UAAU;AAAA,EACf,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,SAAS;AACV;AAEA,eAAsB,gBACrB,iBACA,eACA,UACqB;AACrB,QAAM,SACL,iBACA,gBAAgB,QAChB,gBAAgB,SAAS,YACzB,QAAQ,gBAAgB,IAAI;AAE7B,MAAI,QAAQ;AACX,UAAM,UAAU;AAAA,MACf,GAAI,MAAM,YAAY,OAAO,MAAM;AAAA,QAClC;AAAA,QACA,SAAS;AAAA,MACV,CAAC;AAAA,MACD,GAAG;AAAA,IACJ;AACA,UAAM,WAAW,MAAM,cAAc,QAAQ;AAAA,MAC5C;AAAA,MACA,MAAM;AAAA,MACN;AAAA,IACD,CAAC;AAED,WAAO,MAAM,kBAAkB,SAAS,KAAK;AAAA,EAC9C;AAEA,SAAO;AAAA,IACN,WAAW,MAAM,gBAAgB,eAAe;AAAA,IAChD,UAAU,eAAe;AAAA,IACzB,WAAW,MAAM,gBAAgB,eAAe;AAAA,IAChD,GAAI,gBAAgB,SAAS,aAAa;AAAA,MACzC,KAAK,MAAM,UAAU,eAAe;AAAA,IACrC;AAAA,IACA,GAAI,MAAM,gBAAgB,eAAe;AAAA,EAC1C;AACD;AAEA,eAAe,kBAAkB,OAAyC;AACzE,QAAM,SAAoB,CAAC;AAE3B,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AACjD,QAAI,MAAM,QAAQ,KAAK,GAAG;AACzB,aAAO,GAAG,IAAI,MAAM,kBAAkB,KAAK,MAAM,CAAC,CAAC;AAAA,IACpD,WAAW,OAAO,UAAU,UAAU;AACrC,aAAO,GAAG,IAAI,MAAM,kBAAkB,KAAK,KAAK;AAAA,IACjD,WAAW,OAAO,UAAU,UAAU;AACrC,aAAO,GAAG,IAAI,MAAM,kBAAkB,KAAK;AAAA,IAC5C;AAAA,EACD;AAEA,SAAO;AACR;AAEA,MAAM,SAAS,oBAAI,IAAI;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAED,eAAe,kBAAkB,UAAkB,OAAe;AAEjE,MAAI,SAAS,SAAS,MAAM,GAAG;AAC9B,WAAO;AAAA,EACR;AAEA,SAAO,MAAM,SAAS,OAAO,OAAO;AAAA,IACnC,SAAS;AAAA,IACT,GAAI,OAAO,IAAI,QAAQ,IAAI,EAAE,QAAQ,OAAO,IAAI,EAAE,SAAS;AAAA,EAC5D,CAAC;AACF;","names":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Options } from '../../../shared/types.js';
|
|
2
|
-
import 'zod';
|
|
3
|
-
import '../../../shared/codes.js';
|
|
4
|
-
|
|
5
|
-
declare function createRootFiles(options: Options): Promise<{
|
|
6
|
-
"vitest.config.ts"?: string | undefined;
|
|
7
|
-
"package.json": string;
|
|
8
|
-
"tsconfig.json": string;
|
|
9
|
-
"tsup.config.ts": string;
|
|
10
|
-
"knip.json"?: string | undefined;
|
|
11
|
-
"cspell.json"?: string | undefined;
|
|
12
|
-
"LICENSE.md": string;
|
|
13
|
-
".release-it.json"?: string | undefined;
|
|
14
|
-
".nvmrc": string;
|
|
15
|
-
".prettierignore": string;
|
|
16
|
-
".prettierrc.json": string;
|
|
17
|
-
".markdownlint.json"?: string | undefined;
|
|
18
|
-
".markdownlintignore"?: string | undefined;
|
|
19
|
-
".all-contributorsrc": string;
|
|
20
|
-
".gitignore": string;
|
|
21
|
-
"eslint.config.js": string;
|
|
22
|
-
}>;
|
|
23
|
-
|
|
24
|
-
export { createRootFiles };
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { createCSpellConfig } from "./createCSpellConfig.js";
|
|
2
|
-
import { createDotGitignore } from "./createDotGitignore.js";
|
|
3
|
-
import { createESLintConfig } from "./createESLintConfig.js";
|
|
4
|
-
import { createKnipConfig } from "./createKnipConfig.js";
|
|
5
|
-
import { createTsupConfig } from "./createTsupConfig.js";
|
|
6
|
-
import { formatIgnoreFile } from "./formatters/formatIgnoreFile.js";
|
|
7
|
-
import { formatJson } from "./formatters/formatJson.js";
|
|
8
|
-
import { writeAllContributorsRC } from "./writeAllContributorsRC.js";
|
|
9
|
-
import { writePackageJson } from "./writePackageJson.js";
|
|
10
|
-
async function createRootFiles(options) {
|
|
11
|
-
return {
|
|
12
|
-
".all-contributorsrc": await writeAllContributorsRC(options),
|
|
13
|
-
".gitignore": createDotGitignore(options),
|
|
14
|
-
"eslint.config.js": await createESLintConfig(options),
|
|
15
|
-
...!options.excludeLintMd && {
|
|
16
|
-
".markdownlint.json": await formatJson({
|
|
17
|
-
extends: "markdownlint/style/prettier",
|
|
18
|
-
"first-line-h1": false,
|
|
19
|
-
"no-inline-html": false
|
|
20
|
-
}),
|
|
21
|
-
".markdownlintignore": formatIgnoreFile([
|
|
22
|
-
".github/CODE_OF_CONDUCT.md",
|
|
23
|
-
"CHANGELOG.md",
|
|
24
|
-
"lib/",
|
|
25
|
-
"node_modules/"
|
|
26
|
-
])
|
|
27
|
-
},
|
|
28
|
-
".nvmrc": `20.18.0
|
|
29
|
-
`,
|
|
30
|
-
".prettierignore": formatIgnoreFile([
|
|
31
|
-
"/.husky",
|
|
32
|
-
...options.excludeTests ? [] : ["/coverage"],
|
|
33
|
-
"/lib",
|
|
34
|
-
"/pnpm-lock.yaml"
|
|
35
|
-
]),
|
|
36
|
-
".prettierrc.json": await formatJson({
|
|
37
|
-
$schema: "http://json.schemastore.org/prettierrc",
|
|
38
|
-
overrides: [
|
|
39
|
-
{
|
|
40
|
-
files: ".nvmrc",
|
|
41
|
-
options: { parser: "yaml" }
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
plugins: [
|
|
45
|
-
"prettier-plugin-curly",
|
|
46
|
-
"prettier-plugin-packagejson",
|
|
47
|
-
"prettier-plugin-sh"
|
|
48
|
-
],
|
|
49
|
-
useTabs: true
|
|
50
|
-
}),
|
|
51
|
-
...!options.excludeReleases && {
|
|
52
|
-
".release-it.json": await formatJson({
|
|
53
|
-
git: {
|
|
54
|
-
commitMessage: "chore: release v${version}",
|
|
55
|
-
requireCommits: true
|
|
56
|
-
},
|
|
57
|
-
github: {
|
|
58
|
-
autoGenerate: true,
|
|
59
|
-
release: true,
|
|
60
|
-
releaseName: "v${version}"
|
|
61
|
-
},
|
|
62
|
-
npm: {
|
|
63
|
-
publishArgs: [`--access ${options.access}`, "--provenance"]
|
|
64
|
-
},
|
|
65
|
-
plugins: {
|
|
66
|
-
"@release-it/conventional-changelog": {
|
|
67
|
-
infile: "CHANGELOG.md",
|
|
68
|
-
preset: "angular",
|
|
69
|
-
types: [
|
|
70
|
-
{ section: "Features", type: "feat" },
|
|
71
|
-
{ section: "Bug Fixes", type: "fix" },
|
|
72
|
-
{ section: "Performance Improvements", type: "perf" },
|
|
73
|
-
{ hidden: true, type: "build" },
|
|
74
|
-
{ hidden: true, type: "chore" },
|
|
75
|
-
{ hidden: true, type: "ci" },
|
|
76
|
-
{ hidden: true, type: "docs" },
|
|
77
|
-
{ hidden: true, type: "refactor" },
|
|
78
|
-
{ hidden: true, type: "style" },
|
|
79
|
-
{ hidden: true, type: "test" }
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
})
|
|
84
|
-
},
|
|
85
|
-
"LICENSE.md": `# MIT License
|
|
86
|
-
|
|
87
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
88
|
-
a copy of this software and associated documentation files (the
|
|
89
|
-
'Software'), to deal in the Software without restriction, including
|
|
90
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
91
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
92
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
93
|
-
the following conditions:
|
|
94
|
-
|
|
95
|
-
The above copyright notice and this permission notice shall be
|
|
96
|
-
included in all copies or substantial portions of the Software.
|
|
97
|
-
|
|
98
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
99
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
100
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
101
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
102
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
103
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
104
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
105
|
-
`,
|
|
106
|
-
...!options.excludeLintSpelling && {
|
|
107
|
-
"cspell.json": await createCSpellConfig(options)
|
|
108
|
-
},
|
|
109
|
-
...!options.excludeLintKnip && {
|
|
110
|
-
"knip.json": await createKnipConfig()
|
|
111
|
-
},
|
|
112
|
-
"package.json": await writePackageJson(options),
|
|
113
|
-
"tsconfig.json": await formatJson({
|
|
114
|
-
compilerOptions: {
|
|
115
|
-
declaration: true,
|
|
116
|
-
declarationMap: true,
|
|
117
|
-
esModuleInterop: true,
|
|
118
|
-
module: "NodeNext",
|
|
119
|
-
moduleResolution: "NodeNext",
|
|
120
|
-
noEmit: true,
|
|
121
|
-
resolveJsonModule: true,
|
|
122
|
-
skipLibCheck: true,
|
|
123
|
-
sourceMap: true,
|
|
124
|
-
strict: true,
|
|
125
|
-
target: "ES2022"
|
|
126
|
-
},
|
|
127
|
-
include: ["src"]
|
|
128
|
-
}),
|
|
129
|
-
"tsup.config.ts": await createTsupConfig(options),
|
|
130
|
-
...!options.excludeTests && {
|
|
131
|
-
"vitest.config.ts": `import { defineConfig } from "vitest/config";
|
|
132
|
-
|
|
133
|
-
export default defineConfig({
|
|
134
|
-
test: {
|
|
135
|
-
clearMocks: true,
|
|
136
|
-
coverage: {
|
|
137
|
-
all: true,
|
|
138
|
-
include: ["src"],
|
|
139
|
-
reporter: ["html", "lcov"],
|
|
140
|
-
},
|
|
141
|
-
exclude: ["lib", "node_modules"],
|
|
142
|
-
setupFiles: ["console-fail-test/setup"],
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
|
-
`
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
export {
|
|
150
|
-
createRootFiles
|
|
151
|
-
};
|
|
152
|
-
//# sourceMappingURL=rootFiles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/rootFiles.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { createCSpellConfig } from \"./createCSpellConfig.js\";\nimport { createDotGitignore } from \"./createDotGitignore.js\";\nimport { createESLintConfig } from \"./createESLintConfig.js\";\nimport { createKnipConfig } from \"./createKnipConfig.js\";\nimport { createTsupConfig } from \"./createTsupConfig.js\";\nimport { formatIgnoreFile } from \"./formatters/formatIgnoreFile.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\nimport { writeAllContributorsRC } from \"./writeAllContributorsRC.js\";\nimport { writePackageJson } from \"./writePackageJson.js\";\n\nexport async function createRootFiles(options: Options) {\n\treturn {\n\t\t\".all-contributorsrc\": await writeAllContributorsRC(options),\n\t\t\".gitignore\": createDotGitignore(options),\n\t\t\"eslint.config.js\": await createESLintConfig(options),\n\t\t...(!options.excludeLintMd && {\n\t\t\t\".markdownlint.json\": await formatJson({\n\t\t\t\textends: \"markdownlint/style/prettier\",\n\t\t\t\t\"first-line-h1\": false,\n\t\t\t\t\"no-inline-html\": false,\n\t\t\t}),\n\t\t\t\".markdownlintignore\": formatIgnoreFile([\n\t\t\t\t\".github/CODE_OF_CONDUCT.md\",\n\t\t\t\t\"CHANGELOG.md\",\n\t\t\t\t\"lib/\",\n\t\t\t\t\"node_modules/\",\n\t\t\t]),\n\t\t}),\n\t\t\".nvmrc\": `20.18.0\\n`,\n\t\t\".prettierignore\": formatIgnoreFile([\n\t\t\t\"/.husky\",\n\t\t\t...(options.excludeTests ? [] : [\"/coverage\"]),\n\t\t\t\"/lib\",\n\t\t\t\"/pnpm-lock.yaml\",\n\t\t]),\n\t\t\".prettierrc.json\": await formatJson({\n\t\t\t$schema: \"http://json.schemastore.org/prettierrc\",\n\t\t\toverrides: [\n\t\t\t\t{\n\t\t\t\t\tfiles: \".nvmrc\",\n\t\t\t\t\toptions: { parser: \"yaml\" },\n\t\t\t\t},\n\t\t\t],\n\t\t\tplugins: [\n\t\t\t\t\"prettier-plugin-curly\",\n\t\t\t\t\"prettier-plugin-packagejson\",\n\t\t\t\t\"prettier-plugin-sh\",\n\t\t\t],\n\t\t\tuseTabs: true,\n\t\t}),\n\t\t...(!options.excludeReleases && {\n\t\t\t\".release-it.json\": await formatJson({\n\t\t\t\tgit: {\n\t\t\t\t\tcommitMessage: \"chore: release v${version}\",\n\t\t\t\t\trequireCommits: true,\n\t\t\t\t},\n\t\t\t\tgithub: {\n\t\t\t\t\tautoGenerate: true,\n\t\t\t\t\trelease: true,\n\t\t\t\t\treleaseName: \"v${version}\",\n\t\t\t\t},\n\t\t\t\tnpm: {\n\t\t\t\t\tpublishArgs: [`--access ${options.access}`, \"--provenance\"],\n\t\t\t\t},\n\t\t\t\tplugins: {\n\t\t\t\t\t\"@release-it/conventional-changelog\": {\n\t\t\t\t\t\tinfile: \"CHANGELOG.md\",\n\t\t\t\t\t\tpreset: \"angular\",\n\t\t\t\t\t\ttypes: [\n\t\t\t\t\t\t\t{ section: \"Features\", type: \"feat\" },\n\t\t\t\t\t\t\t{ section: \"Bug Fixes\", type: \"fix\" },\n\t\t\t\t\t\t\t{ section: \"Performance Improvements\", type: \"perf\" },\n\t\t\t\t\t\t\t{ hidden: true, type: \"build\" },\n\t\t\t\t\t\t\t{ hidden: true, type: \"chore\" },\n\t\t\t\t\t\t\t{ hidden: true, type: \"ci\" },\n\t\t\t\t\t\t\t{ hidden: true, type: \"docs\" },\n\t\t\t\t\t\t\t{ hidden: true, type: \"refactor\" },\n\t\t\t\t\t\t\t{ hidden: true, type: \"style\" },\n\t\t\t\t\t\t\t{ hidden: true, type: \"test\" },\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t}),\n\t\t\"LICENSE.md\": `# MIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n`,\n\t\t...(!options.excludeLintSpelling && {\n\t\t\t\"cspell.json\": await createCSpellConfig(options),\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"knip.json\": await createKnipConfig(),\n\t\t}),\n\t\t\"package.json\": await writePackageJson(options),\n\t\t\"tsconfig.json\": await formatJson({\n\t\t\tcompilerOptions: {\n\t\t\t\tdeclaration: true,\n\t\t\t\tdeclarationMap: true,\n\t\t\t\tesModuleInterop: true,\n\t\t\t\tmodule: \"NodeNext\",\n\t\t\t\tmoduleResolution: \"NodeNext\",\n\t\t\t\tnoEmit: true,\n\t\t\t\tresolveJsonModule: true,\n\t\t\t\tskipLibCheck: true,\n\t\t\t\tsourceMap: true,\n\t\t\t\tstrict: true,\n\t\t\t\ttarget: \"ES2022\",\n\t\t\t},\n\t\t\tinclude: [\"src\"],\n\t\t}),\n\t\t\"tsup.config.ts\": await createTsupConfig(options),\n\t\t...(!options.excludeTests && {\n\t\t\t\"vitest.config.ts\": `import { defineConfig } from \"vitest/config\";\n\nexport default defineConfig({\n\ttest: {\n\t\tclearMocks: true,\n\t\tcoverage: {\n\t\t\tall: true,\n\t\t\tinclude: [\"src\"],\n\t\t\treporter: [\"html\", \"lcov\"],\n\t\t},\n\t\texclude: [\"lib\", \"node_modules\"],\n\t\tsetupFiles: [\"console-fail-test/setup\"],\n\t},\n});\n`,\n\t\t}),\n\t};\n}\n"],"mappings":"AACA,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,SAAS,8BAA8B;AACvC,SAAS,wBAAwB;AAEjC,eAAsB,gBAAgB,SAAkB;AACvD,SAAO;AAAA,IACN,uBAAuB,MAAM,uBAAuB,OAAO;AAAA,IAC3D,cAAc,mBAAmB,OAAO;AAAA,IACxC,oBAAoB,MAAM,mBAAmB,OAAO;AAAA,IACpD,GAAI,CAAC,QAAQ,iBAAiB;AAAA,MAC7B,sBAAsB,MAAM,WAAW;AAAA,QACtC,SAAS;AAAA,QACT,iBAAiB;AAAA,QACjB,kBAAkB;AAAA,MACnB,CAAC;AAAA,MACD,uBAAuB,iBAAiB;AAAA,QACvC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAC;AAAA,IACF;AAAA,IACA,UAAU;AAAA;AAAA,IACV,mBAAmB,iBAAiB;AAAA,MACnC;AAAA,MACA,GAAI,QAAQ,eAAe,CAAC,IAAI,CAAC,WAAW;AAAA,MAC5C;AAAA,MACA;AAAA,IACD,CAAC;AAAA,IACD,oBAAoB,MAAM,WAAW;AAAA,MACpC,SAAS;AAAA,MACT,WAAW;AAAA,QACV;AAAA,UACC,OAAO;AAAA,UACP,SAAS,EAAE,QAAQ,OAAO;AAAA,QAC3B;AAAA,MACD;AAAA,MACA,SAAS;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MACA,SAAS;AAAA,IACV,CAAC;AAAA,IACD,GAAI,CAAC,QAAQ,mBAAmB;AAAA,MAC/B,oBAAoB,MAAM,WAAW;AAAA,QACpC,KAAK;AAAA,UACJ,eAAe;AAAA,UACf,gBAAgB;AAAA,QACjB;AAAA,QACA,QAAQ;AAAA,UACP,cAAc;AAAA,UACd,SAAS;AAAA,UACT,aAAa;AAAA,QACd;AAAA,QACA,KAAK;AAAA,UACJ,aAAa,CAAC,YAAY,QAAQ,MAAM,IAAI,cAAc;AAAA,QAC3D;AAAA,QACA,SAAS;AAAA,UACR,sCAAsC;AAAA,YACrC,QAAQ;AAAA,YACR,QAAQ;AAAA,YACR,OAAO;AAAA,cACN,EAAE,SAAS,YAAY,MAAM,OAAO;AAAA,cACpC,EAAE,SAAS,aAAa,MAAM,MAAM;AAAA,cACpC,EAAE,SAAS,4BAA4B,MAAM,OAAO;AAAA,cACpD,EAAE,QAAQ,MAAM,MAAM,QAAQ;AAAA,cAC9B,EAAE,QAAQ,MAAM,MAAM,QAAQ;AAAA,cAC9B,EAAE,QAAQ,MAAM,MAAM,KAAK;AAAA,cAC3B,EAAE,QAAQ,MAAM,MAAM,OAAO;AAAA,cAC7B,EAAE,QAAQ,MAAM,MAAM,WAAW;AAAA,cACjC,EAAE,QAAQ,MAAM,MAAM,QAAQ;AAAA,cAC9B,EAAE,QAAQ,MAAM,MAAM,OAAO;AAAA,YAC9B;AAAA,UACD;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,IACA,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAqBd,GAAI,CAAC,QAAQ,uBAAuB;AAAA,MACnC,eAAe,MAAM,mBAAmB,OAAO;AAAA,IAChD;AAAA,IACA,GAAI,CAAC,QAAQ,mBAAmB;AAAA,MAC/B,aAAa,MAAM,iBAAiB;AAAA,IACrC;AAAA,IACA,gBAAgB,MAAM,iBAAiB,OAAO;AAAA,IAC9C,iBAAiB,MAAM,WAAW;AAAA,MACjC,iBAAiB;AAAA,QAChB,aAAa;AAAA,QACb,gBAAgB;AAAA,QAChB,iBAAiB;AAAA,QACjB,QAAQ;AAAA,QACR,kBAAkB;AAAA,QAClB,QAAQ;AAAA,QACR,mBAAmB;AAAA,QACnB,cAAc;AAAA,QACd,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,QAAQ;AAAA,MACT;AAAA,MACA,SAAS,CAAC,KAAK;AAAA,IAChB,CAAC;AAAA,IACD,kBAAkB,MAAM,iBAAiB,OAAO;AAAA,IAChD,GAAI,CAAC,QAAQ,gBAAgB;AAAA,MAC5B,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAerB;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Options } from '../../../shared/types.js';
|
|
2
|
-
import 'zod';
|
|
3
|
-
import '../../../shared/codes.js';
|
|
4
|
-
|
|
5
|
-
declare function createSrc(options: Options): Promise<{
|
|
6
|
-
"greet.ts": string;
|
|
7
|
-
"index.ts": string;
|
|
8
|
-
"types.ts": string;
|
|
9
|
-
"greet.test.ts"?: string | undefined;
|
|
10
|
-
}>;
|
|
11
|
-
|
|
12
|
-
export { createSrc };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { formatTypeScript } from "./formatters/formatTypeScript.js";
|
|
2
|
-
async function createSrc(options) {
|
|
3
|
-
return {
|
|
4
|
-
...!options.excludeTests && {
|
|
5
|
-
"greet.test.ts": await formatTypeScript(
|
|
6
|
-
`
|
|
7
|
-
import { describe, expect, it, vi } from "vitest";
|
|
8
|
-
|
|
9
|
-
import { greet } from "./greet.js";
|
|
10
|
-
|
|
11
|
-
const message = "Yay, testing!";
|
|
12
|
-
|
|
13
|
-
describe("greet", () => {
|
|
14
|
-
it("logs to the console once when message is provided as a string", () => {
|
|
15
|
-
const logger = vi.spyOn(console, "log").mockImplementation(() => undefined);
|
|
16
|
-
|
|
17
|
-
greet(message);
|
|
18
|
-
|
|
19
|
-
expect(logger).toHaveBeenCalledWith(message);
|
|
20
|
-
expect(logger).toHaveBeenCalledTimes(1);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
it("logs to the console once when message is provided as an object", () => {
|
|
24
|
-
const logger = vi.spyOn(console, "log").mockImplementation(() => undefined);
|
|
25
|
-
|
|
26
|
-
greet({ message });
|
|
27
|
-
|
|
28
|
-
expect(logger).toHaveBeenCalledWith(message);
|
|
29
|
-
expect(logger).toHaveBeenCalledTimes(1);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it("logs once when times is not provided in an object", () => {
|
|
33
|
-
const logger = vi.fn();
|
|
34
|
-
|
|
35
|
-
greet({ logger, message });
|
|
36
|
-
|
|
37
|
-
expect(logger).toHaveBeenCalledWith(message);
|
|
38
|
-
expect(logger).toHaveBeenCalledTimes(1);
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it("logs a specified number of times when times is provided", () => {
|
|
42
|
-
const logger = vi.fn();
|
|
43
|
-
const times = 7;
|
|
44
|
-
|
|
45
|
-
greet({ logger, message, times });
|
|
46
|
-
|
|
47
|
-
expect(logger).toHaveBeenCalledWith(message);
|
|
48
|
-
expect(logger).toHaveBeenCalledTimes(7);
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
`
|
|
52
|
-
)
|
|
53
|
-
},
|
|
54
|
-
"greet.ts": await formatTypeScript(
|
|
55
|
-
`import { GreetOptions } from "./types.js";
|
|
56
|
-
|
|
57
|
-
export function greet(options: GreetOptions | string) {
|
|
58
|
-
const {
|
|
59
|
-
logger = console.log.bind(console),
|
|
60
|
-
message,
|
|
61
|
-
times = 1,
|
|
62
|
-
} = typeof options === "string" ? { message: options } : options;
|
|
63
|
-
|
|
64
|
-
for (let i = 0; i < times; i += 1) {
|
|
65
|
-
logger(message);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
`
|
|
69
|
-
),
|
|
70
|
-
"index.ts": await formatTypeScript(
|
|
71
|
-
`
|
|
72
|
-
export * from "./greet.js";
|
|
73
|
-
export * from "./types.js";
|
|
74
|
-
`
|
|
75
|
-
),
|
|
76
|
-
"types.ts": await formatTypeScript(
|
|
77
|
-
`
|
|
78
|
-
export interface GreetOptions {
|
|
79
|
-
logger?: (message: string) => void;
|
|
80
|
-
message: string;
|
|
81
|
-
times?: number;
|
|
82
|
-
}
|
|
83
|
-
`
|
|
84
|
-
)
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
export {
|
|
88
|
-
createSrc
|
|
89
|
-
};
|
|
90
|
-
//# sourceMappingURL=src.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/src.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { formatTypeScript } from \"./formatters/formatTypeScript.js\";\n\nexport async function createSrc(options: Options) {\n\treturn {\n\t\t...(!options.excludeTests && {\n\t\t\t\"greet.test.ts\": await formatTypeScript(\n\t\t\t\t`\n\t\t\t\t\timport { describe, expect, it, vi } from \"vitest\";\n\n\t\t\t\t\timport { greet } from \"./greet.js\";\n\n\t\t\t\t\tconst message = \"Yay, testing!\";\n\n\t\t\t\t\tdescribe(\"greet\", () => {\n\t\t\t\t\t\tit(\"logs to the console once when message is provided as a string\", () => {\n\t\t\t\t\t\t\tconst logger = vi.spyOn(console, \"log\").mockImplementation(() => undefined);\n\n\t\t\t\t\t\t\tgreet(message);\n\n\t\t\t\t\t\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\t\t\t\t\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tit(\"logs to the console once when message is provided as an object\", () => {\n\t\t\t\t\t\t\tconst logger = vi.spyOn(console, \"log\").mockImplementation(() => undefined);\n\n\t\t\t\t\t\t\tgreet({ message });\n\n\t\t\t\t\t\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\t\t\t\t\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tit(\"logs once when times is not provided in an object\", () => {\n\t\t\t\t\t\t\tconst logger = vi.fn();\n\n\t\t\t\t\t\t\tgreet({ logger, message });\n\n\t\t\t\t\t\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\t\t\t\t\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tit(\"logs a specified number of times when times is provided\", () => {\n\t\t\t\t\t\t\tconst logger = vi.fn();\n\t\t\t\t\t\t\tconst times = 7;\n\n\t\t\t\t\t\t\tgreet({ logger, message, times });\n\n\t\t\t\t\t\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\t\t\t\t\t\texpect(logger).toHaveBeenCalledTimes(7);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t`,\n\t\t\t),\n\t\t}),\n\t\t\"greet.ts\": await formatTypeScript(\n\t\t\t`import { GreetOptions } from \"./types.js\";\n\n\t\t\t\texport function greet(options: GreetOptions | string) {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tlogger = console.log.bind(console),\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t\ttimes = 1,\n\t\t\t\t\t} = typeof options === \"string\" ? { message: options } : options;\n\t\t\t\t\n\t\t\t\t\tfor (let i = 0; i < times; i += 1) {\n\t\t\t\t\t\tlogger(message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t`,\n\t\t),\n\t\t\"index.ts\": await formatTypeScript(\n\t\t\t`\n\t\t\t\texport * from \"./greet.js\";\n\t\t\t\texport * from \"./types.js\";\n\t\t\t`,\n\t\t),\n\t\t\"types.ts\": await formatTypeScript(\n\t\t\t`\n\t\t\t\texport interface GreetOptions {\n\t\t\t\t\tlogger?: (message: string) => void;\n\t\t\t\t\tmessage: string;\n\t\t\t\t\ttimes?: number;\n\t\t\t\t}\n\t\t\t`,\n\t\t),\n\t};\n}\n"],"mappings":"AACA,SAAS,wBAAwB;AAEjC,eAAsB,UAAU,SAAkB;AACjD,SAAO;AAAA,IACN,GAAI,CAAC,QAAQ,gBAAgB;AAAA,MAC5B,iBAAiB,MAAM;AAAA,QACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MA8CD;AAAA,IACD;AAAA,IACA,YAAY,MAAM;AAAA,MACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAcD;AAAA,IACA,YAAY,MAAM;AAAA,MACjB;AAAA;AAAA;AAAA;AAAA,IAID;AAAA,IACA,YAAY,MAAM;AAAA,MACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { readFileSafeAsJson } from "../../../shared/readFileSafeAsJson.js";
|
|
2
|
-
import { formatJson } from "./formatters/formatJson.js";
|
|
3
|
-
async function writeAllContributorsRC(options) {
|
|
4
|
-
const existing = await readFileSafeAsJson(
|
|
5
|
-
".all-contributorsrc"
|
|
6
|
-
);
|
|
7
|
-
return await formatJson({
|
|
8
|
-
badgeTemplate: ' <a href="#contributors" target="_blank"><img alt="\u{1F46A} All Contributors: <%= contributors.length %>" src="https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-<%= contributors.length %>-21bb42.svg" /></a>',
|
|
9
|
-
contributors: existing?.contributors ?? [],
|
|
10
|
-
contributorsSortAlphabetically: true,
|
|
11
|
-
projectName: options.repository,
|
|
12
|
-
projectOwner: options.owner
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
writeAllContributorsRC
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=writeAllContributorsRC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/writeAllContributorsRC.ts"],"sourcesContent":["import { readFileSafeAsJson } from \"../../../shared/readFileSafeAsJson.js\";\nimport { AllContributorsData, Options } from \"../../../shared/types.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\n\nexport async function writeAllContributorsRC(options: Options) {\n\tconst existing = (await readFileSafeAsJson(\n\t\t\".all-contributorsrc\",\n\t)) as AllContributorsData | null;\n\n\treturn await formatJson({\n\t\tbadgeTemplate:\n\t\t\t'\t<a href=\"#contributors\" target=\"_blank\"><img alt=\"👪 All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-<%= contributors.length %>-21bb42.svg\" /></a>',\n\t\tcontributors: existing?.contributors ?? [],\n\t\tcontributorsSortAlphabetically: true,\n\t\tprojectName: options.repository,\n\t\tprojectOwner: options.owner,\n\t});\n}\n"],"mappings":"AAAA,SAAS,0BAA0B;AAEnC,SAAS,kBAAkB;AAE3B,eAAsB,uBAAuB,SAAkB;AAC9D,QAAM,WAAY,MAAM;AAAA,IACvB;AAAA,EACD;AAEA,SAAO,MAAM,WAAW;AAAA,IACvB,eACC;AAAA,IACD,cAAc,UAAU,gBAAgB,CAAC;AAAA,IACzC,gCAAgC;AAAA,IAChC,aAAa,QAAQ;AAAA,IACrB,cAAc,QAAQ;AAAA,EACvB,CAAC;AACF;","names":[]}
|