@gjuchault/typescript-library-starter
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -1,22 +0,11 @@ | ||
# 1.0.0 (2022-05-08) | ||
# [2.0.0](https://github.com/gjuchault/typescript-library-starter/compare/v1.1.0...v2.0.0) (2022-05-09) | ||
### Bug Fixes | ||
### chore | ||
* **ci:** correct ava config ([08c3386](https://github.com/gjuchault/typescript-library-starter/commit/08c3386fa677f4f84fbbdced1b440c3b7b41c8d3)) | ||
* **ci:** do a concrete build during main ci ([d600b4e](https://github.com/gjuchault/typescript-library-starter/commit/d600b4e11e2b447e27c9b6686ff81ff0e0aed234)) | ||
* **clean:** use force parameter ([9b420f6](https://github.com/gjuchault/typescript-library-starter/commit/9b420f63b12702e7657495db1b35f017a2734162)) | ||
* **npm:** fill npmignore ([e612a05](https://github.com/gjuchault/typescript-library-starter/commit/e612a05ed3f3b080c1ce7d56c096af8f61c137c4)) | ||
* **setup:** output workflow file in proper directory ([de0bcb4](https://github.com/gjuchault/typescript-library-starter/commit/de0bcb4f5396c4c431507e6b572a779125e72d6d)) | ||
* **setup:** replace CoC email ([03af6c2](https://github.com/gjuchault/typescript-library-starter/commit/03af6c23ccc1255eb8ce720744225027eafd989d)) | ||
* **spell:** add gjuchault to cspell and cleanup cspell on setup ([fe94147](https://github.com/gjuchault/typescript-library-starter/commit/fe94147e4ca12fb081b8db81098bb6ea211d7655)) | ||
* **tests:** use a custom esbuild hook to have proper sourcemaps ([5711f1a](https://github.com/gjuchault/typescript-library-starter/commit/5711f1ab953e7b3f8546d85ad10aa7da54f6b878)) | ||
* **tsc:** proper usage of emitDeclarationOnly ([aa522fa](https://github.com/gjuchault/typescript-library-starter/commit/aa522fa1359dc7dc0bc458a53fd47a1fb03504d5)) | ||
* **workflow:** change job name ([7aeb47a](https://github.com/gjuchault/typescript-library-starter/commit/7aeb47aad6335de823674c3cd78354a41162c7bc)) | ||
* **package:** push version to 2.0 after re-creating repository ([98b47e9](https://github.com/gjuchault/typescript-library-starter/commit/98b47e9570207105a0d7b45610dec039596244e5)) | ||
### Features | ||
### BREAKING CHANGES | ||
* setup script ([747deca](https://github.com/gjuchault/typescript-library-starter/commit/747decaa97ae9fa669a54dff52a28e409ccb646d)) | ||
* **setup:** add package name to cspell ([fb8ef06](https://github.com/gjuchault/typescript-library-starter/commit/fb8ef06e578610d8f34868f1abd9b5295505e01f)) | ||
* **setup:** add yarn berry option ([562401c](https://github.com/gjuchault/typescript-library-starter/commit/562401c8f6cfa2c65547083e67b650428db1ed42)) | ||
* **package:** push version to 2.0 after re-creating repository |
{ | ||
"name": "@gjuchault/typescript-library-starter", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Yet another typescript library starter template", | ||
@@ -38,2 +38,3 @@ "keywords": [ | ||
"test:coverage": "nyc ava && nyc report --reporter=html", | ||
"test:setup": "node -r ./esbuild-hook ./scripts/testSetup", | ||
"spell:check": "cspell \"{README.md,CODE_OF_CONDUCT.md,CONTRIBUTING.md,.github/*.md,src/**/*.ts}\"", | ||
@@ -40,0 +41,0 @@ "cz": "cz", |
@@ -22,2 +22,4 @@ # Typescript Library Starter | ||
Or click on `Use this template` button on GitHub! | ||
## Features | ||
@@ -24,0 +26,0 @@ |
@@ -14,3 +14,5 @@ import path from "path"; | ||
const packageJsonPath = path.join(rootPath, "package.json"); | ||
const contributingPath = path.join(rootPath, "CONTRIBUTING.md"); | ||
const setupPath = __filename; | ||
const testSetupPath = path.join(rootPath, "scripts/testSetup.ts"); | ||
const workflowPath = path.join( | ||
@@ -20,2 +22,6 @@ rootPath, | ||
); | ||
const issueConfigPath = path.join( | ||
rootPath, | ||
".github/ISSUE_TEMPLATE/config.yml" | ||
); | ||
const codeOfConductPath = path.join(rootPath, "CODE_OF_CONDUCT.md"); | ||
@@ -62,2 +68,14 @@ | ||
return run({ packageName, githubUserName, userMail }); | ||
} | ||
export async function run({ | ||
packageName, | ||
githubUserName, | ||
userMail, | ||
}: { | ||
packageName: string; | ||
githubUserName: string; | ||
userMail: string; | ||
}) { | ||
await applyPackageName({ packageName, githubUserName, userMail }); | ||
@@ -90,4 +108,5 @@ | ||
new Map([ | ||
["Typescript Library Starter", packageName], | ||
["typescript-library-starter", packageSlug], | ||
[/Typescript Library Starter/, packageName], | ||
[/typescript-library-starter/, packageSlug], | ||
[/\s+- name: Setup test\s+run:[\w :]+/i, ""], | ||
]) | ||
@@ -100,3 +119,3 @@ ) | ||
replaceInFile( | ||
workflowPath, | ||
issueConfigPath, | ||
new Map([ | ||
@@ -112,2 +131,15 @@ [ | ||
await logAsyncTask( | ||
"Changing CONTRIBUTING.md file", | ||
replaceInFile( | ||
contributingPath, | ||
new Map([ | ||
[ | ||
/gjuchault\/typescript-library-starter/g, | ||
`${githubUserName}/${packageName}`, | ||
], | ||
]) | ||
) | ||
); | ||
await logAsyncTask( | ||
"Renaming GitHub workflow file", | ||
@@ -172,2 +204,3 @@ fs.rename( | ||
await logAsyncTask("Removing setup.ts script", fs.rm(setupPath)); | ||
await logAsyncTask("Removing testSetup.ts script", fs.rm(testSetupPath)); | ||
} | ||
@@ -198,3 +231,6 @@ | ||
async function removeOrigin() { | ||
await logAsyncTask(`Removing git origin`, exec(`git remote rm origin`)); | ||
const { stdout: origin } = await exec(`git remote get-url origin`); | ||
if (origin.includes("gjuchault/typescript-library-starter")) { | ||
await logAsyncTask(`Removing git origin`, exec(`git remote rm origin`)); | ||
} | ||
} | ||
@@ -201,0 +237,0 @@ |
Sorry, the diff of this file is not supported yet
29564
32
509
75