-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3297259
commit d82a198
Showing
16 changed files
with
3,867 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@jcamp" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# .github/workflows/release.yml | ||
|
||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
|
||
- run: npx changelogen gh release | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
node_modules | ||
*.log* | ||
.cache | ||
.output | ||
.env | ||
dist | ||
.DS_Store | ||
/coverage | ||
*.tgz | ||
.DS_Store | ||
.idea | ||
.temp | ||
cache | ||
temp | ||
pnpm-global |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"*": ["prettier --write --ignore-unknown"], | ||
"*.ts": ["eslint"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
shamefully-hoist=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dist | ||
pnpm-lock.yaml | ||
cache | ||
temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const baseConfig = require('@jcamp/eslint-config/.prettierrc.js') | ||
|
||
module.exports = { | ||
...baseConfig, | ||
/* make any changes here*/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,43 @@ | ||
# npm-package-repo-template | ||
A starter repo for TypeScript NPM packages with various integrations already done. | ||
# learn-changelog | ||
|
||
working on setting up empty repo for easy start for future projects | ||
|
||
# Integrations | ||
|
||
## [Changelogen](https://github.com/unjs/changelogen) | ||
|
||
Creates / updates CHANGELOG.md; has GH Action for automatic release creation on GitHub | ||
|
||
Note for prerelease versions (0.x.x), considers the 0.x.0 as the major, with the 0.0.x as the minor. | ||
|
||
## [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks) | ||
|
||
Easily allows GitHub hooks in a project \ | ||
Used for commitlint and lintstaged below | ||
|
||
## [commitlint](https://commitlint.js.org/#/) | ||
|
||
Ensures commit messages follow conventions | ||
|
||
## [lint-staged](https://github.com/okonet/lint-staged) | ||
|
||
Lints all staged files to ensure code formatting is consistent. | ||
|
||
## [Eslint Config](https://github.com/jcamp-code/eslint-config) | ||
|
||
My preferred eslint / prettier setup; extends [@antfu's config](https://github.com/antfu/eslint-config) | ||
|
||
## [Prettier](https://prettier.io/) | ||
|
||
Standardized code formatting | ||
|
||
## [Netlify](https://www.netlify.com) | ||
|
||
Standard deploy file (obviously delete if not needed) | ||
|
||
# Workflow | ||
|
||
- Make changes | ||
- push commits / merge branches | ||
- `pnpm release` - updates changelog and release version, commits, tags and pushes; publishes too by default | ||
- GitHub Action creates GitHub release from the version (`v*`) tag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[build.environment] | ||
NPM_FLAGS = "--prefix=/dev/null" | ||
NODE_VERSION = "16" | ||
|
||
[build] | ||
publish = "dist" | ||
command = "npx pnpm i --store=node_modules/.pnpm-store && npx pnpm run build" | ||
|
||
[[redirects]] | ||
from = "/*" | ||
to = "/index.html" | ||
status = 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "@jcamp/test", | ||
"version": "0.0.3", | ||
"private": true, | ||
"repository": "https://github.com/jcamp-test/learn-changelog", | ||
"scripts": { | ||
"dev": "tsc -w", | ||
"build": "tsc", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"format": "prettier --check --write .", | ||
"postinstall": "npx simple-git-hooks", | ||
"release": "pnpm changelogen --release --push && pnpm publish", | ||
"release:minor": "pnpm changelogen --release --minor --push && pnpm publish", | ||
"release:major": "pnpm changelogen --release --major --push && pnpm publish", | ||
"release:patch": "pnpm changelogen --release --patch --push && pnpm publish" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.5.1", | ||
"@commitlint/config-conventional": "^17.4.4", | ||
"@jcamp/eslint-config": "0.5.0", | ||
"changelogen": "^0.5.2", | ||
"eslint": "8.37.0", | ||
"lint-staged": "^13.2.0", | ||
"prettier": "2.8.7", | ||
"simple-git-hooks": "^2.8.1", | ||
"typescript": "^5.0.3" | ||
} | ||
} |
Oops, something went wrong.