Skip to content

Commit

Permalink
refactor: files
Browse files Browse the repository at this point in the history
  • Loading branch information
kaandesu committed Jan 16, 2024
1 parent 0a39384 commit 38d08a6
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 43 deletions.
32 changes: 16 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@

These are the useful scripts that you can use while developing. You can find them in the `package.json` file. You can run them by using `npm run <script_name>`.

| Script | Description |
| ---------------------- | ---------------------------------------------- |
| `dev` | Start the development environment |
| `build` | Test and build the app and the `live-demo` |
| `build:live-demo` | Only build the `live-demo` |
| `build:lib` | Only build the `library` |
| `coverage:web` | Serve the test coverage report to localhost |
| `generate:types` | Generate all the types for the project |
| `changeset` | Adds a changelog to the project after a change |
| `test` | Run the tests once |
| `test:watch` | Watch the tests |
| `test:coverage` | Create a coverage report for the tests |
| `clean` | Remove ./dist and ./live-demo directories |
| Script | Description |
| ----------------- | ---------------------------------------------- |
| `dev` | Start the development environment |
| `build` | Test and build the app and the `live-demo` |
| `build:live-demo` | Only build the `live-demo` |
| `build:lib` | Only build the `library` |
| `coverage:web` | Serve the test coverage report to localhost |
| `generate:types` | Generate all the types for the project |
| `changeset` | Adds a changelog to the project after a change |
| `test` | Run the tests once |
| `test:watch` | Watch the tests |
| `test:coverage` | Create a coverage report for the tests |
| `clean` | Remove ./dist and ./live-demo directories |

When pushing your changes, always include a **changeset** file. You can do this by running the `changeset` script. It will ask you a few questions and then create a file for you. You can read more about it [here](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

### 🐛 **Did you find a bug?**

Ensure the bug was not already reported by searching on GitHub under [Issues](https://github.com/kaandesu/ts-vite-npm-package/issues). If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/kaandesu/ts-vite-npm-package/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible demonstrating the expected behavior that is not occurring.
Ensure the bug was not already reported by searching on GitHub under [Issues](https://github.com/kaandesu/banana-converter/issues). If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/kaandesu/banana-converter/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible demonstrating the expected behavior that is not occurring.

### 💡 **Do you want to add a new feature or change an existing one?**

[Open a GitHub issue](https://github.com/kaandesu/ts-vite-npm-package/issues/new) stating your feature request clearly. We can discuss it on the issue thread, then you can implement it! 🎉
[Open a GitHub issue](https://github.com/kaandesu/banana-converter/issues/new) stating your feature request clearly. We can discuss it on the issue thread, then you can implement it! 🎉

### **Did you write a change that fixes a bug?**

Expand Down Expand Up @@ -66,4 +66,4 @@ Open a new GitHub pull request with the patch.

Open source software is beautiful, all of your contributions are much appreciated

Thanks!
Thanks!
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

<!-- Add tech stack badges below -->

![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)
![Vite](https://img.shields.io/badge/vite-%23646CFF.svg?style=for-the-badge&logo=vite&logoColor=white)
![GitHub Actions](https://img.shields.io/badge/github%20actions-%232671E5.svg?style=for-the-badge&logo=githubactions&logoColor=white)
![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white) ![Vite](https://img.shields.io/badge/vite-%23646CFF.svg?style=for-the-badge&logo=vite&logoColor=white) ![GitHub Actions](https://img.shields.io/badge/github%20actions-%232671E5.svg?style=for-the-badge&logo=githubactions&logoColor=white)

<!-- Title -->
<h3 align="center">Banana Converter</h3>
Expand Down Expand Up @@ -41,9 +39,19 @@ npm i banana-converter
## Usage

```typescript
import { convert } from "banana-converter";
import { convert } from 'banana-converter'

convert(1.5, "banana", "cm"); // 26.67
convert(24, "yard", "banana"); // 123.432
convert(60, "kilometer", "banana"); // 337078.651685
convert(1.5, 'banana', 'cm') // 26.67
convert(24, 'yard', 'banana') // 123.432
convert(60, 'kilometer', 'banana') // 337078.651685
```

## Contributing

Contributions to the project is highly appreciated. If you have any suggestions/questions/requests please consider [opening an issue](https://github.com/kaandesu/banana-converter/issues/new). If you want to contribute to the project, fixing an open issue is greatly recommended and appreciated. To see the all contribution rules please check the [contribution rules](CONTRIBUTING.md).

### Contact

| Maintainer |
| --------------------------------------- |
| [kaandesu](https://github.com/kaandesu) |
8 changes: 4 additions & 4 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'TS npm template',
description: 'Vitepress documentation example for ts-vite-npm-template repository',
title: 'Banana Converter',
description: 'Convert Lengths and Distances to Bananas',
lang: 'en-US',
base: '/ts-vite-npm-template/',
base: '/banana-converter/',
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
logo: '/logo.webp',
Expand All @@ -24,6 +24,6 @@ export default defineConfig({
},
],

socialLinks: [{ icon: 'github', link: 'https://github.com/kaandesu/ts-vite-npm-template' }],
socialLinks: [{ icon: 'github', link: 'https://github.com/kaandesu/banana-converter' }],
},
})
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
layout: home

hero:
name: 'TS Vite NPM Template'
text: 'Vitepress documentation example'
tagline: My great package tagline
name: 'Banana Converter'
text: 'Convert Lengths and Distances to Bananas'
tagline: Simple, Blazingly Fast, and Free
actions:
- theme: brand
text: Live Demo
link: https://kaandesu.github.io/ts-vite-npm-template/live-demo/index.html
link: https://kaandesu.github.io/banana-converter/live-demo/index.html
- theme: alt
text: Markdown Examples
link: /markdown-examples
- theme: alt
text: API Examples
link: /api-examples
image:
src: https://raw.githubusercontent.com/kaandesu/ts-vite-npm-template/main/public/logo.webp
alt: ts-vite-npm-template
src: https://raw.githubusercontent.com/kaandesu/banana-converter/main/public/logo.webp
alt: banana-converter

features:
- title: Feature A
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"keywords": [
"banana",
"converter",
"lenght",
"length",
"distance",
"unit",
"conversion"
"conversion",
"monkey"
],
"repository": {
"type": "git",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"types": ["node"],
"baseUrl": "./",
"paths": {
"~/*": ["src/myPackagePlugin/*"]
"~/*": ["src/bananaConverter/*"]
}
},
"include": ["src/myPackagePlugin/*.ts", "src/myPackagePlugin/*.d.ts"],
"include": ["src/bananaConverter/*.ts", "src/bananaConverter/*.d.ts"],
"references": [{ "path": "./tsconfig.node.json" }]
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"types": ["node", "vitest/globals"],
"baseUrl": "./",
"paths": {
"~/*": ["src/myPackagePlugin/*"]
"~/*": ["src/bananaConverter/*"]
}
},
"include": ["src/**/*.ts", "src/**/*.d.ts"],
Expand Down
10 changes: 5 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig(({ mode }) => {
},
resolve: {
alias: {
'~': resolve(__dirname, 'src', 'myPackagePlugin'),
'~': resolve(__dirname, 'src', 'bananaConverter'),
},
},
build: {
Expand All @@ -28,14 +28,14 @@ export default defineConfig(({ mode }) => {
},
resolve: {
alias: {
'~': resolve(__dirname, 'src', 'myPackagePlugin'),
'~': resolve(__dirname, 'src', 'bananaConverter'),
},
},
build: {
lib: {
entry: resolve(__dirname, 'src/myPackagePlugin', 'index.ts'),
name: 'my_package_name',
fileName: 'my_package_name',
entry: resolve(__dirname, 'src/bananaConverter', 'index.ts'),
name: 'banana-converter',
fileName: 'banana-converter',
},
},
}
Expand Down

0 comments on commit 38d08a6

Please sign in to comment.