Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
feat: first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDing committed Sep 15, 2023
0 parents commit 13d5f49
Show file tree
Hide file tree
Showing 62 changed files with 9,110 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[cargo-new]
vsc = "git"

[build]
pipelining = true

[target.x86_64-pc-windows-msvc]
# Our minimum supported CPU is sandy bridge, beacuse we require
# SSE4.2 and AVX instructions for SIMD support.
# Since sandy bridge is released in 2011, we can assume that most
# of our users have a CPU that supports these instructions.
rustflags = ["-C", "target-cpu=sandybridge"]

[target.x86_64-unknown-linux-gnu]
# Our minimum supported CPU is sandy bridge, beacuse we require
# SSE4.2 and AVX instructions for SIMD support.
# Since sandy bridge is released in 2011, we can assume that most
# of our users have a CPU that supports these instructions.
rustflags = ["-C", "target-cpu=sandybridge"]

[target.aarch64-apple-darwin]
rustflags = ["-C", "target-cpu=apple-m1", "-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup"]

[target.x86_64-apple-darwin]
# Haswell is the minimum supported CPU for macOS 12.
# Since Haswell is released in 2013, we can assume that most
# of our macOS users have a CPU that supports these instructions.
rustflags = ["-C", "target-cpu=haswell"]
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
end_of_line = lf
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
10 changes: 10 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Each sub-packages in this monorepo should have its own .eslintrc.yml.
# This root .eslintrc.yml is only used for files outside of any sub-packages.
root: true

extends:
- plugin:@pleisto/eslint-plugin/base

parserOptions:
project:
- ./tsconfig.json
29 changes: 29 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
# Auto detect
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto eol=lf
yarn.lock linguist-generated
*.mdx linguist-language=TypeScript
# Fonts
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary
*.svg binary
*.ico binary
*.gif binary
*.png binary
*.wbmp binary
*.webp binary
# This way Git won't bother showing massive diffs when each time we subsequently add or update yarn & plugins:
/.yarn/releases/** binary linguist-vendored
/.yarn/plugins/** binary linguist-vendored
/.yarn/cache/* linguist-vendored
**/docs/api/** linguist-vendored
/.vscode/*.json linguist-language=JSON5
/tools/**/*.js linguist-vendored
**/.storybook/** linguist-vendored
**/lang/*.json linguist-generated
65 changes: 65 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# development
/.idea
/.vs
*.sublime-project
*.sublime-workspace
/.settings

# IDE - VSCode
.vscode/
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# dependencies
.turbo/
node_modules/
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.pnp.*
.bundle/

# Dev-only files
.eslintcache
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
.yarn-integrity
*.tsbuildinfo

# misc
.DS_Store
.AppleDouble
.LSOverride
$RECYCLE.BIN/
Desktop.ini
Thumbs.db
ehthumbs.db
._*

# testing
.coverage-cache/
.nyc_output/
coverage/

# build
dist/
storybook-static/
target/
tmp/
.turbo
var/**
!var/.gitkeep
.i18n-temp.json
20 changes: 20 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Add files here to ignore them from prettier formatting

dist/
coverage/
tmp/
log/
node_modules/
.yarn/
CHANGELOG.*
*.env
.next/
*.tsbuildinfo
.eslintcache
.nyc_output/
.coverage-cache/
dist/
storybook-static/
target/

/tools/helm-charts/**/*.yaml
8 changes: 8 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
semi: false
singleQuote: true
trailingComma: none
printWidth: 120
tabWidth: 2
bracketSpacing: true
bracketSameLine: true
arrowParens: avoid
21 changes: 21 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": true,
"dynamicImport": true
},
"target": "es2022",
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true,
"react": {
"runtime": "automatic"
}
},
"externalHelpers": true
},
"isModule": true
}
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.3.cjs

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
nodeLinker: node-modules

supportedArchitectures:
cpu:
- current
libc:
- current
os:
- current
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.6.3.cjs
64 changes: 64 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Contribute to Flappy

Welcome and thank you interest in contributing to Flappy! Flappy is developed in the open and continually improved by the community. It is because of you that we can bring the best of AI to everyone.

This guide provides information on filing issues and guidelines for open source contributions. Please leave comments/suggestions if you find something is missing or incorrect.

## Did you find a bug?

- **Do not open up a GitHub issue if the bug is a security vulnerability**. Instead, please follow the instructions in [SECURITY.md](./SECURITY.md).
- **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/pleisto/flappy/issues).
- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/pleisto/flappy/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring. Also, we **strongly recommend that you write your issue in English**. Issues written in other languages will be automatically translated into English by the bot, but this may cause misunderstandings between you and the maintainers.

## Set up your development environment

We use scripts written in TypeScript to manage the monorepo. So, you'll need to install [Node.js](https://nodejs.org/en/) no matter which language implementation you're working on.

```bash
# install Volta, a JavaScript toolchain manager
curl https://get.volta.sh | bash

# install Node.js
volta install node

# install dependencies
yarn install
```

Apart from JVM-based languages like Java, the implementations of Flappy in other languages are built on top of a core library written in Rust. So, you may also need to set up the Rust toolchain as follows:

```bash
# install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

## Preparation for commit

- Write tests for your code.
- Run all linting with auto fix. `yarn lint:fix`

## Committing

> This repo demonstrates git hooks integration with [cz-conventional-changelog](https://github.com/commitizen/cz-conventional-changelog).
### Git Message Scope

- If the change is related to `packages/*` then the scope is the name of the package,
- And, if the change is related to a functional module with a namespace (e.g. :accounts, :admin) then the scope is namespace,
- Else the scope name is empty.
- **Use `yarn commit` and not `git commit`**
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
- Push to your fork and [Submit a pull request](https://github.com/pleisto/q/compare/)
- Wait for us. We try to at least comment on pull requests within one business day.
- We may suggest changes.
- Please, squash your commits to a single one if you introduced a new changes or pushed more than
one commit. Let's keep the history clean.

## Revert commits

If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit.

The content of the commit message body should contain:

- information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`,
- a clear description of the reason for reverting the commit message.
Loading

0 comments on commit 13d5f49

Please sign in to comment.