Skip to content

Commit 8a4399c

Browse files
author
Reinaldy Rafli
committed
docs: updated information for hacktoberfest
1 parent 94f484e commit 8a4399c

7 files changed

Lines changed: 144 additions & 12 deletions

File tree

.github/CODE_OF_CONDUCT.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4+
5+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6+
7+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8+
9+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10+
11+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12+
13+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at https://www.contributor-covenant.org/version/1/0/0/code-of-conduct.html

.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md

Whitespace-only changes.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Ask a question
4+
url: https://github.com/teknologi-umum/flourite/discussions
5+
about: Please use the following link to ask a question.
6+
- name: Saweria
7+
url: https://saweria.co/teknologiumum
8+
about: Love Teknologi Umum? Consider supporting us via Saweria.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Hello and thank you for your interest on submitting a PR to this repository!
2+
3+
First and foremost, I hope you have read the CONTRIBUTING.md file.
4+
If not, you can find it here: https://github.com/teknologi-umum/flourite/blob/master/CONTRIBUTING.md
5+
6+
I would let you know that if you submit a PR without opening up an issue first,
7+
your PR might be very likely rejected by the maintainers.
8+
9+
If you think you can go ahead without opening up an issue, please explain changes about your PR
10+
in as much detail as possible.
11+
12+
Here is a few checklist that act as a reminder for your PR:
13+
14+
- [ ] I've opened a Github issue beforehand
15+
- [ ] I've explained my PR in as much detail as possible.
16+
- [ ] I'm using the conventional commit for my commit messages, or at least my commit messages are meaningful and easy to understand.
17+
- [ ] I've added test files for new features.
18+
19+
After everything's complete, you can delete this placeholder text. Again, thank you!

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.6.2
1+
v16.6

CONTRIBUTING.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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!

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ Detects a programming language from a given string.
99
- Built-in support for CommonJS and ESM format
1010
- Built-in Typescript typings
1111
- No external dependencies
12-
- 100 test cases and growing!
12+
- 150 test cases and growing!
1313

1414
## Detectable languages
1515

16-
| Languages | | |
17-
| --------- | ---------- | ------ |
18-
| C | HTML | PHP |
19-
| C++ | Java | Python |
20-
| C# | Javascript | Ruby |
21-
| CSS | Julia | Rust |
22-
| Go | Lua | SQL |
16+
| Languages | | | |
17+
| --------- | ---------- | ------ | ---- |
18+
| C | HTML | Lua | Rust |
19+
| C++ | Java | Pascal | SQL |
20+
| C# | Javascript | PHP | YAML |
21+
| CSS | Julia | Python | |
22+
| Go | Kotlin | Ruby | |
2323

2424
## Install
2525

@@ -30,8 +30,8 @@ $ npm install flourite
3030
or via a CDN (unpkg or jsdelivr)
3131

3232
```html
33-
<script src="https://unpkg.com/flourite@1.1.0"></script>
34-
<script src="https://cdn.jsdelivr.net/npm/flourite@1.1.0/dist/index.iife.js"></script>
33+
<script src="https://unpkg.com/flourite@1.1.1"></script>
34+
<script src="https://cdn.jsdelivr.net/npm/flourite@1.1.1/dist/index.iife.js"></script>
3535
```
3636

3737
## Usage
@@ -60,13 +60,16 @@ const code = flourite('printf("Hello World")', { statistics: true });
6060
// Java: 0,
6161
// Javascript: 0,
6262
// Julia: 0,
63+
// Kotlin: 0,
6364
// Lua: -20,
65+
// Pascal: 0,
6466
// PHP: 0,
6567
// Python: 0,
6668
// Ruby: 0,
6769
// Rust: 0,
6870
// SQL: 0,
69-
// Unknown: 1
71+
// Unknown: 1,
72+
// YAML: 0
7073
// }
7174
```
7275

0 commit comments

Comments
 (0)