|
| 1 | +# Contributing Guide |
| 2 | + |
| 3 | +Hello! We'd love to see your contribution on this repository soon, even if it's just a typo fix! |
| 4 | + |
| 5 | +Contributing means anything from reporting bugs, ideas, suggestion, code fix, even new feature. |
| 6 | + |
| 7 | +Bear in mind to keep your contributions under the [Code of Conduct](./github/CODE_OF_CONDUCT.md) for the community. |
| 8 | + |
| 9 | +## Bug report, ideas, and suggestion |
| 10 | + |
| 11 | +The [issues](https://github.com/teknologi-umum/flourite/issues) page is a great way to communicate to us. Other than that, we have a [Telegram group](https://t.me/teknologi_umum) that you can discuss your ideas into. If you're not an Indonesian speaker, it's 100% fine to talk in English there. |
| 12 | + |
| 13 | +Please make sure that the issue you're creating is in as much detail as possible. Poor communication might lead to a big mistake, we're trying to avoid that. |
| 14 | + |
| 15 | +## Pull request |
| 16 | + |
| 17 | +**A big heads up before you're writing a breaking change code or a new feature: Please open up an [issue](https://github.com/teknologi-umum/flourite/issues) regarding what you're working on, or just talk in the [Telegram group](https://t.me/teknologi_umum).** |
| 18 | + |
| 19 | +### Prerequisites |
| 20 | + |
| 21 | +You will need a few things to get things working: |
| 22 | + |
| 23 | +1. Node.js current version (as of now, we're using v16.6.x as defined in the `.nvmrc` file). You can install it through the [official Node.js download page](https://nodejs.org/en/download/), but we recommend using [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm). Here's a simple installation/setup guide, but you should really refer directly to the corresponding repository's README. |
| 24 | + |
| 25 | +```sh |
| 26 | +# If you want to install fnm |
| 27 | +$ curl -fsSL https://fnm.vercel.app/install | bash |
| 28 | + |
| 29 | +# Then simply use this command |
| 30 | +$ fnm use |
| 31 | + |
| 32 | +# OR if you want to install nvm |
| 33 | +$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash |
| 34 | + |
| 35 | +$ nvm use |
| 36 | +``` |
| 37 | + |
| 38 | +### Getting Started |
| 39 | + |
| 40 | +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own Github account and [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device. |
| 41 | +2. Run `npm install` to install the dependencies needed. |
| 42 | +3. Run `npm run test:tdd` if you want to start developing in a [TDD](https://en.wikipedia.org/wiki/Test-driven_development) manner. |
| 43 | +4. Happy coding! |
| 44 | + |
| 45 | +You are encouraged to use [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0-beta.2/) for your commit message. |
| 46 | + |
| 47 | +### Testing your change |
| 48 | + |
| 49 | +All changes should be covered by tests. Please put a test case in the appropriate file on `tests` directory. |
| 50 | + |
| 51 | +``` |
| 52 | +npm run test |
| 53 | +``` |
| 54 | + |
| 55 | +### Directory structure |
| 56 | + |
| 57 | +``` |
| 58 | +. |
| 59 | +├── benchmark - Benchmark needs |
| 60 | +│ |
| 61 | +├── CONTRIBUTING.md - You are here |
| 62 | +├── LICENSE |
| 63 | +├── package-lock.json |
| 64 | +├── package.json |
| 65 | +├── README.md |
| 66 | +├── rollup.config.js - Build configuration |
| 67 | +├── src - Source directory |
| 68 | +│ ├── languages - Regular expressions of supported languages |
| 69 | +│ │ |
| 70 | +│ ├── index.ts |
| 71 | +│ ├── points.ts |
| 72 | +│ ├── shiki.ts |
| 73 | +│ └── types.ts |
| 74 | +│ |
| 75 | +├── tests - Unit testing directory |
| 76 | +│ |
| 77 | +└── tsconfig.json |
| 78 | +``` |
| 79 | + |
| 80 | +### Before creating a PR |
| 81 | + |
| 82 | +Please run ESLint and Prettier with these commands so you're good on the CI process. |
| 83 | + |
| 84 | +```sh |
| 85 | +$ npm run lint |
| 86 | +$ npm run format |
| 87 | +``` |
| 88 | + |
| 89 | +And you're set! |
0 commit comments