Skip to content

Commit

Permalink
docs: updated information for hacktoberfest
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinaldy Rafli committed Sep 30, 2021
1 parent 94f484e commit 8a4399c
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 12 deletions.
13 changes: 13 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Contributor Code of Conduct

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.

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.

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.

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.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

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
Empty file.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Ask a question
url: https://github.com/teknologi-umum/flourite/discussions
about: Please use the following link to ask a question.
- name: Saweria
url: https://saweria.co/teknologiumum
about: Love Teknologi Umum? Consider supporting us via Saweria.
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Hello and thank you for your interest on submitting a PR to this repository!

First and foremost, I hope you have read the CONTRIBUTING.md file.
If not, you can find it here: https://github.com/teknologi-umum/flourite/blob/master/CONTRIBUTING.md

I would let you know that if you submit a PR without opening up an issue first,
your PR might be very likely rejected by the maintainers.

If you think you can go ahead without opening up an issue, please explain changes about your PR
in as much detail as possible.

Here is a few checklist that act as a reminder for your PR:

- [ ] I've opened a Github issue beforehand
- [ ] I've explained my PR in as much detail as possible.
- [ ] I'm using the conventional commit for my commit messages, or at least my commit messages are meaningful and easy to understand.
- [ ] I've added test files for new features.

After everything's complete, you can delete this placeholder text. Again, thank you!
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.6.2
v16.6
89 changes: 89 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Contributing Guide

Hello! We'd love to see your contribution on this repository soon, even if it's just a typo fix!

Contributing means anything from reporting bugs, ideas, suggestion, code fix, even new feature.

Bear in mind to keep your contributions under the [Code of Conduct](./github/CODE_OF_CONDUCT.md) for the community.

## Bug report, ideas, and suggestion

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.

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.

## Pull request

**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).**

### Prerequisites

You will need a few things to get things working:

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.

```sh
# If you want to install fnm
$ curl -fsSL https://fnm.vercel.app/install | bash

# Then simply use this command
$ fnm use

# OR if you want to install nvm
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

$ nvm use
```

### Getting Started

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.
2. Run `npm install` to install the dependencies needed.
3. Run `npm run test:tdd` if you want to start developing in a [TDD](https://en.wikipedia.org/wiki/Test-driven_development) manner.
4. Happy coding!

You are encouraged to use [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0-beta.2/) for your commit message.

### Testing your change

All changes should be covered by tests. Please put a test case in the appropriate file on `tests` directory.

```
npm run test
```

### Directory structure

```
.
├── benchmark - Benchmark needs
├── CONTRIBUTING.md - You are here
├── LICENSE
├── package-lock.json
├── package.json
├── README.md
├── rollup.config.js - Build configuration
├── src - Source directory
│ ├── languages - Regular expressions of supported languages
│ │
│ ├── index.ts
│ ├── points.ts
│ ├── shiki.ts
│ └── types.ts
├── tests - Unit testing directory
└── tsconfig.json
```

### Before creating a PR

Please run ESLint and Prettier with these commands so you're good on the CI process.

```sh
$ npm run lint
$ npm run format
```

And you're set!
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ Detects a programming language from a given string.
- Built-in support for CommonJS and ESM format
- Built-in Typescript typings
- No external dependencies
- 100 test cases and growing!
- 150 test cases and growing!

## Detectable languages

| Languages | | |
| --------- | ---------- | ------ |
| C | HTML | PHP |
| C++ | Java | Python |
| C# | Javascript | Ruby |
| CSS | Julia | Rust |
| Go | Lua | SQL |
| Languages | | | |
| --------- | ---------- | ------ | ---- |
| C | HTML | Lua | Rust |
| C++ | Java | Pascal | SQL |
| C# | Javascript | PHP | YAML |
| CSS | Julia | Python | |
| Go | Kotlin | Ruby | |

## Install

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

```html
<script src="https://unpkg.com/flourite@1.1.0"></script>
<script src="https://cdn.jsdelivr.net/npm/flourite@1.1.0/dist/index.iife.js"></script>
<script src="https://unpkg.com/flourite@1.1.1"></script>
<script src="https://cdn.jsdelivr.net/npm/flourite@1.1.1/dist/index.iife.js"></script>
```

## Usage
Expand Down Expand Up @@ -60,13 +60,16 @@ const code = flourite('printf("Hello World")', { statistics: true });
// Java: 0,
// Javascript: 0,
// Julia: 0,
// Kotlin: 0,
// Lua: -20,
// Pascal: 0,
// PHP: 0,
// Python: 0,
// Ruby: 0,
// Rust: 0,
// SQL: 0,
// Unknown: 1
// Unknown: 1,
// YAML: 0
// }
```

Expand Down

0 comments on commit 8a4399c

Please sign in to comment.