generated from ericvera/ts-lib-template
-
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.
ci: disable docs & tests, and add CLI placeholder
- Loading branch information
Showing
11 changed files
with
175 additions
and
1,840 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 |
---|---|---|
|
@@ -27,9 +27,6 @@ jobs: | |
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Run tests | ||
run: yarn test | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
|
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,29 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Do not run docs on CI | ||
yarn is-ci || yarn docs | ||
|
||
yarn lint-staged | ||
|
||
# Check if there are unstaged changes to README.md | ||
DOCS_ADDED=$(git ls-files --others --exclude-standard docs) | ||
DOCS_MODIFIED=$(git ls-files --modified docs) | ||
DOCS_DELETED=$(git ls-files --deleted docs) | ||
|
||
if [ "$DOCS_ADDED" != "" ] || [ "$DOCS_MODIFIED" != "" ] || [ "$DOCS_DELETED" != "" ]; then | ||
echo "---------------------------------------------------------------------" | ||
echo "Commit blocked by pre-commit hook." | ||
echo "---------------------------------------------------------------------" | ||
echo "WHY?" | ||
echo "There are unstaged changes in the /docs directory which means that" | ||
echo "those changes won't be committed. In order to ensure that the " | ||
echo "documentation stays up to date with the code documentation is" | ||
echo "generated using tsdoc as a precommit hook." | ||
echo "" | ||
echo "FIX" | ||
echo " 1. Review the changes to files in the docs directory" | ||
echo " 2. Stage the changes" | ||
echo " 3. Commit the changes" | ||
echo "---------------------------------------------------------------------" | ||
exit 1 | ||
fi |
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,63 +1,6 @@ | ||
# TypeScript library repo template | ||
# firebase-index-gen | ||
|
||
**Template repo for building a modern TypeScript library optimized for minimal setup and maintenance effort** | ||
**Generate a Firestore Index file from indexes used during a Firebase emulator run.** | ||
|
||
An opinionated template repo configured with the following: | ||
|
||
- Typescript | ||
- ESM only | ||
- Node >= 20 | ||
- Test using Vitest | ||
- Prettier (see `package.json` for config) | ||
- Typescript ESLint (strict & typed mode) | ||
- Github Actions deployment to npm on push to `main` branch | ||
- Github dependabot configured for weekly updates | ||
- Auto-approve dependabot changes after lint, built, and tests pass | ||
- Auto package version bump on push to `main` branch (based on [Conventional Commits](https://www.conventionalcommits.org/) conventions) | ||
- Github Release generation on deployment (based on [Conventional Commits](https://www.conventionalcommits.org/) conventions) | ||
- Yarn with `nodeLinker: node-modules` | ||
- Block commits on lint/format issues (using `lint-staged`) | ||
- VS Code config with suggested eslint and prettier extensions | ||
- VS Code configured for auto-save | ||
|
||
## Configuration before you start: | ||
|
||
### Update the `LICENSE` file | ||
|
||
- Replace `I Forgot To Add My Name Here` on the copyright line with your name | ||
|
||
### Update the `package.json` file | ||
|
||
- `name`: Your package name | ||
- `repository`: Your repo info | ||
- `keywords`: Keywords to help people find your package | ||
|
||
### Add NPM_TOKEN to the repo secrets | ||
|
||
NOTE: The package must have been published at least once with `npm publish` in order to be able to generate a granular token scoped to the specific package. | ||
|
||
1. [Get a token](https://docs.npmjs.com/creating-and-viewing-access-tokens#creating-granular-access-tokens-on-the-website) from npmjs.com | ||
2. [Add a secret with the npm token to be used by Github Actions](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions). The secret must be named `NPM_TOKEN`. | ||
|
||
### Enable auto-merge for dependabot pull-requests | ||
|
||
There are actually two options: | ||
|
||
1. [Enable auto-merge for the repo](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository) (only avaylable for public repos or paid accounts as of this writing) | ||
1. Disable the auto-merge option by removing it from `.github/workflows/dependabot.yml` | ||
|
||
## Things to know | ||
|
||
- Run `yarn` at the root to install all the dependencies and register the new package name before pushing the initial commit | ||
- Ensure that any commits follow [Conventional Commits](https://www.conventionalcommits.org/) conventions in order for the version bump and release notes to work appropriately. | ||
|
||
## Yarn Scripts | ||
|
||
- `yarn build` | ||
- `yarn lint` | ||
- `yarn test` | ||
- `yarn smoke` - runs build, lint, and test | ||
|
||
# API Reference | ||
|
||
See [docs](docs/README.md) | ||
[![github license](https://img.shields.io/github/license/ericvera/firebase-index-gen.svg?style=flat-square)](https://github.com/ericvera/firebase-index-gen/blob/master/LICENSE) | ||
[![npm version](https://img.shields.io/npm/v/firebase-index-gen.svg?style=flat-square)](https://npmjs.org/package/firebase-index-gen) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 +1,5 @@ | ||
export const add = (a: number, b: number) => a + b | ||
#! /usr/bin/env node | ||
|
||
console.log('Hello!') | ||
console.log('@:', __dirname) | ||
console.log('Bye!') |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.