Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
coltenkrauter authored Oct 15, 2024
0 parents commit ae7830e
Show file tree
Hide file tree
Showing 17 changed files with 7,817 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This auto assigns the following teams to pull requests
* @krauters/reviewers
18 changes: 18 additions & 0 deletions .github/workflows/node-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Node Publish
run-name: Node Publish [${{ github.ref_name }}] triggered by [${{ github.event_name }}/${{ github.actor }}]

on:
release:
types: published
push:
branches: '*'
workflow_dispatch:

jobs:
publish:
uses: krauters/shared-workflows/.github/workflows/node-publish.yaml@main
secrets:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
with:
node_install: true
dry_run: ${{ github.event_name != 'release' }}
13 changes: 13 additions & 0 deletions .github/workflows/node-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Node Release
run-name: Node Release [${{ github.ref_name }}] triggered by [${{ github.event_name }}/${{ github.actor }}]

on:
push:
branches: main
workflow_dispatch:

jobs:
publish:
uses: krauters/shared-workflows/.github/workflows/node-release.yaml@main
secrets:
GH_TOKEN_RELEASES: ${{ secrets.GH_TOKEN_RELEASES }}
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Node.js dependencies
node_modules/

# Output directories
dist/

# IDE and editor files
.idea/
.vscode/

# System files
.DS_Store
Thumbs.db

# Coverage directories
coverage/

# Environment variable files
dev.env
.env
.env.local
.env.*.local
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

MAIN_DIR=./node_modules/@krauters/utils/scripts/pre-commit
. $MAIN_DIR/index.sh
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
15 changes: 15 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ISC License

Copyright (c) 2024 Krauters

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Typescript Core
A TypeScript Repository that stands as a starting point for all other TypeScript repositories.

## Husky

Husky helps manage Git hooks easily, automating things like running tests or linting before a commit is made. This ensures your code is in good shape.

Pre-commit hooks run scripts before a commit is finalized to catch issues or enforce standards. With Husky, setting up these hooks across your team becomes easy, keeping your codebase clean and consistent.

### Our Custom Pre-Commit Hook

This project uses a custom pre-commit hook to run `npm run bundle`. This ensures that our bundled assets are always up to date before any commit (which is especially important for TypeScript GitHub Actions). Husky automates this, so no commits will go through without a fresh bundle, keeping everything streamlined.

## Contributing

The goal of this project is to continually evolve and improve its core features, making it more efficient and easier to use. Development happens openly here on GitHub, and we’re thankful to the community for contributing bug fixes, enhancements, and fresh ideas. Whether you're fixing a small bug or suggesting a major improvement, your input is invaluable.

## License

This project is licensed under the ISC License. Please see the [LICENSE](./LICENSE) file for more details.

## 🥂 Thanks Contributors

Thanks for spending time on this project.

<a href="https://github.com/krauters/typescript-core/graphs/contributors">
<img src="https://contrib.rocks/image?repo=krauters/typescript-core" />
</a>
4 changes: 4 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* eslint-disable filenames/match-exported */
const eslintConfig = require('@krauters/eslint-config')

module.exports = eslintConfig
20 changes: 20 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* eslint-disable @typescript-eslint/naming-convention */

module.exports = {
collectCoverage: true,
coverageDirectory: 'coverage',
coverageThreshold: {
global: {
branches: 60,
functions: 60,
lines: 60,
statements: 60,
},
},
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/test/**/*.test.{ts,tsx}'],
transform: {
'^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.jest.json' }],
},
}
Loading

0 comments on commit ae7830e

Please sign in to comment.