create-typescript-app 1.49.3 → 1.49.4
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.
|
@@ -46,7 +46,7 @@ function generateTopContent(options, existingBadges) {
|
|
|
46
46
|
/typescript.*strict/i
|
|
47
47
|
],
|
|
48
48
|
[
|
|
49
|
-
`<img alt="npm package version" src="https://img.shields.io/npm/v
|
|
49
|
+
`<img alt="npm package version" src="https://img.shields.io/npm/v/${options.repository}?color=21bb42" />`,
|
|
50
50
|
/npm.*v/i
|
|
51
51
|
]
|
|
52
52
|
]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/steps/writeReadme/generateTopContent.ts"],"sourcesContent":["import { Options } from \"../../shared/types.js\";\n\nexport function generateTopContent(options: Options, existingBadges: string[]) {\n\tconst remainingExistingBadges = new Set(existingBadges);\n\tconst badges: string[] = [];\n\n\tfunction spliceBadge(\n\t\tbadgeLine: false | string | undefined,\n\t\texistingMatcher: RegExp,\n\t) {\n\t\tconst existingMatch = existingBadges.find((existingLine) =>\n\t\t\texistingMatcher.test(existingLine),\n\t\t);\n\n\t\tif (existingMatch) {\n\t\t\tremainingExistingBadges.delete(existingMatch);\n\t\t}\n\n\t\tif (badgeLine) {\n\t\t\tbadges.push(badgeLine);\n\t\t}\n\t}\n\n\tfor (const [badgeLine, existingMatcher] of [\n\t\t[\n\t\t\t!options.excludeAllContributors &&\n\t\t\t\t`<!-- prettier-ignore-start -->\n\t<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n\t<a href=\"#contributors\" target=\"_blank\"><img alt=\"All Contributors: 2\" src=\"https://img.shields.io/badge/all_contributors-17-21bb42.svg\" /></a>\n\t<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\t<!-- prettier-ignore-end -->`,\n\t\t\t/ALL-CONTRIBUTORS-BADGE:START/,\n\t\t],\n\t\t[\n\t\t\t!options.excludeTests &&\n\t\t\t\t`<a href=\"https://codecov.io/gh/${options.owner}/${options.repository}\" target=\"_blank\"><img alt=\"Codecov Test Coverage\" src=\"https://codecov.io/gh/${options.owner}/${options.repository}/branch/main/graph/badge.svg\"/></a>`,\n\t\t\t/https:\\/\\/codecov\\.io\\/gh/,\n\t\t],\n\t\t[\n\t\t\t`<a href=\"https://github.com/${options.owner}/${options.repository}/blob/main/.github/CODE_OF_CONDUCT.md\" target=\"_blank\"><img alt=\"Contributor Covenant\" src=\"https://img.shields.io/badge/code_of_conduct-enforced-21bb42\" /></a>`,\n\t\t\t/CODE_OF_CONDUCT\\.md/,\n\t\t],\n\t\t[\n\t\t\t`<a href=\"https://github.com/${options.owner}/${options.repository}/blob/main/LICENSE.md\" target=\"_blank\"><img alt=\"License: MIT\" src=\"https://img.shields.io/github/license/${options.owner}/${options.repository}?color=21bb42\"></a>`,\n\t\t\t/LICENSE\\.(md|txt)/,\n\t\t],\n\t\t[\n\t\t\toptions.funding &&\n\t\t\t\t`<a href=\"https://github.com/sponsors/${options.funding}\" target=\"_blank\"><img alt=\"Sponsor: On GitHub\" src=\"https://img.shields.io/badge/sponsor-on_github-21bb42.svg\" /></a>`,\n\t\t\t/github.+sponsors/,\n\t\t],\n\t\t[\n\t\t\t`<img alt=\"Style: Prettier\" src=\"https://img.shields.io/badge/style-prettier-21bb42.svg\" />`,\n\t\t\t/style.*prettier/i,\n\t\t],\n\t\t[\n\t\t\t`<img alt=\"TypeScript: Strict\" src=\"https://img.shields.io/badge/typescript-strict-21bb42.svg\" />`,\n\t\t\t/typescript.*strict/i,\n\t\t],\n\t\t[\n\t\t\t`<img alt=\"npm package version\" src=\"https://img.shields.io/npm/v
|
|
1
|
+
{"version":3,"sources":["../../../src/steps/writeReadme/generateTopContent.ts"],"sourcesContent":["import { Options } from \"../../shared/types.js\";\n\nexport function generateTopContent(options: Options, existingBadges: string[]) {\n\tconst remainingExistingBadges = new Set(existingBadges);\n\tconst badges: string[] = [];\n\n\tfunction spliceBadge(\n\t\tbadgeLine: false | string | undefined,\n\t\texistingMatcher: RegExp,\n\t) {\n\t\tconst existingMatch = existingBadges.find((existingLine) =>\n\t\t\texistingMatcher.test(existingLine),\n\t\t);\n\n\t\tif (existingMatch) {\n\t\t\tremainingExistingBadges.delete(existingMatch);\n\t\t}\n\n\t\tif (badgeLine) {\n\t\t\tbadges.push(badgeLine);\n\t\t}\n\t}\n\n\tfor (const [badgeLine, existingMatcher] of [\n\t\t[\n\t\t\t!options.excludeAllContributors &&\n\t\t\t\t`<!-- prettier-ignore-start -->\n\t<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n\t<a href=\"#contributors\" target=\"_blank\"><img alt=\"All Contributors: 2\" src=\"https://img.shields.io/badge/all_contributors-17-21bb42.svg\" /></a>\n\t<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\t<!-- prettier-ignore-end -->`,\n\t\t\t/ALL-CONTRIBUTORS-BADGE:START/,\n\t\t],\n\t\t[\n\t\t\t!options.excludeTests &&\n\t\t\t\t`<a href=\"https://codecov.io/gh/${options.owner}/${options.repository}\" target=\"_blank\"><img alt=\"Codecov Test Coverage\" src=\"https://codecov.io/gh/${options.owner}/${options.repository}/branch/main/graph/badge.svg\"/></a>`,\n\t\t\t/https:\\/\\/codecov\\.io\\/gh/,\n\t\t],\n\t\t[\n\t\t\t`<a href=\"https://github.com/${options.owner}/${options.repository}/blob/main/.github/CODE_OF_CONDUCT.md\" target=\"_blank\"><img alt=\"Contributor Covenant\" src=\"https://img.shields.io/badge/code_of_conduct-enforced-21bb42\" /></a>`,\n\t\t\t/CODE_OF_CONDUCT\\.md/,\n\t\t],\n\t\t[\n\t\t\t`<a href=\"https://github.com/${options.owner}/${options.repository}/blob/main/LICENSE.md\" target=\"_blank\"><img alt=\"License: MIT\" src=\"https://img.shields.io/github/license/${options.owner}/${options.repository}?color=21bb42\"></a>`,\n\t\t\t/LICENSE\\.(md|txt)/,\n\t\t],\n\t\t[\n\t\t\toptions.funding &&\n\t\t\t\t`<a href=\"https://github.com/sponsors/${options.funding}\" target=\"_blank\"><img alt=\"Sponsor: On GitHub\" src=\"https://img.shields.io/badge/sponsor-on_github-21bb42.svg\" /></a>`,\n\t\t\t/github.+sponsors/,\n\t\t],\n\t\t[\n\t\t\t`<img alt=\"Style: Prettier\" src=\"https://img.shields.io/badge/style-prettier-21bb42.svg\" />`,\n\t\t\t/style.*prettier/i,\n\t\t],\n\t\t[\n\t\t\t`<img alt=\"TypeScript: Strict\" src=\"https://img.shields.io/badge/typescript-strict-21bb42.svg\" />`,\n\t\t\t/typescript.*strict/i,\n\t\t],\n\t\t[\n\t\t\t`<img alt=\"npm package version\" src=\"https://img.shields.io/npm/v/${options.repository}?color=21bb42\" />`,\n\t\t\t/npm.*v/i,\n\t\t],\n\t] as const) {\n\t\tspliceBadge(badgeLine, existingMatcher);\n\t}\n\n\treturn `<h1 align=\"center\">${options.title}</h1>\n\n<p align=\"center\">${options.description}</p>\n\n<p align=\"center\">\n${[...badges, ...remainingExistingBadges]\n\t.map((badge) => `\\t${badge}`)\n\t.join(\"\\n\")}\n</p>${\n\t\toptions.mode === \"migrate\"\n\t\t\t? \"\"\n\t\t\t: `\n\n## Usage\n\n\\`\\`\\`shell\nnpm i ${options.repository}\n\\`\\`\\`\n\\`\\`\\`ts\nimport { greet } from \"${options.repository}\";\n\ngreet(\"Hello, world! 💖\");\n\\`\\`\\``\n\t}`;\n}\n"],"mappings":"AAEO,SAAS,mBAAmB,SAAkB,gBAA0B;AAC9E,QAAM,0BAA0B,IAAI,IAAI,cAAc;AACtD,QAAM,SAAmB,CAAC;AAE1B,WAAS,YACR,WACA,iBACC;AACD,UAAM,gBAAgB,eAAe;AAAA,MAAK,CAAC,iBAC1C,gBAAgB,KAAK,YAAY;AAAA,IAClC;AAEA,QAAI,eAAe;AAClB,8BAAwB,OAAO,aAAa;AAAA,IAC7C;AAEA,QAAI,WAAW;AACd,aAAO,KAAK,SAAS;AAAA,IACtB;AAAA,EACD;AAEA,aAAW,CAAC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