Skip to content

Commit

Permalink
fix: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
productdevbook committed May 21, 2023
1 parent e16d8f2 commit b4835fd
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 34 deletions.
Binary file added .github/assets/schob.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 46 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,55 @@
# Typescript Bundle Template
# Schob

![Typescript Bundle Template](https://github.com/productdevbookcom/assets/blob/main/ts-bundle-template.jpg?raw=true)
![Schob](https://github.com/productdevbookcom/schob/blob/main/.github/assets/schob.png?raw=true)


This is a template for creating a Typescript bundle. It is based on the [Typescript](https://www.typescriptlang.org/) compiler with the [Tsup](https://github.com/egoist/tsup) bundler.

## Features

- [x] [Typescript](https://www.typescriptlang.org/)
- [x] [Tsup](https://github.com/egoist/tsup)
- [x] [ESLint](https://eslint.org/) with [Antfu's ESLint Config](https://github.com/antfu/eslint-config)
- [x] [Bumpp](https://github.com/antfu/bumpp) github changelog generator
- [x] [Vitest](https://vitest.dev/)
- [x] [Pnpm](https://pnpm.io/)
- [x] [GitHub Actions]()
- [x] [NPM Local Registry]()
- [x] [Renovate]()
## Installation

```bash
pnpm add @huntersofbook/schob
```

## Usage

1. To use this template, click the "Use this template" button above.
2. Clone the repository to your local machine.
3. Run `pnpm install` to install the dependencies.
4. Run `pnpm build` to build the bundle.
5. Run `pnpm start` to start the bundle.
6. Run `pnpm lint` to lint the code. (You can also run `pnpm lint:fix` to fix the linting errors.)
7. Run `pnpm test` to run the tests. (You can also run `pnpm test:watch` to run the tests in watch mode.)
8. Run `pnpm release` to bump the version. Terminal will ask you to select the version type. And then it will automatically commit and push the changes. GitHub Actions will automatically publish git tags. NPM local registry will automatically publish the package.

## Configuration

### Renovate

[Setup Github App](https://github.com/apps/renovate) for Renovate.

### TS Config Base

(tsconfig.json)[https://github.com/tsconfig/bases/tree/main/bases] is used as the base config for the Typescript compiler.
```ts
import { merge } from '@huntersofbook/schob'

const schema = {
isPro: false,
darkMode: false,
pages: {
home: false,
settings: false,
},
}

const newData = {
isPro: false,
darkMode: true,
pages: {
home: false,
settings: true,
hello: false,
},
dd: 'dd',
tt: {
dd: 'dd',
},
cc: [{ dd: 'dd' }],
}

const res = merge({ schema, newData })
```

### Output
```bash

{
isPro: false,
darkMode: true,
pages: { home: false, settings: true },
}
```
## Sponsors
Expand All @@ -50,4 +62,4 @@ This is a template for creating a Typescript bundle. It is based on the [Typescr
## License
This project is licensed under the [MIT License](LICENSE).
MIT License © 2022-PRESENT [productdevbook](https://github.com/productdevbook)

0 comments on commit b4835fd

Please sign in to comment.