From 3382b29bb72200b2b71e2b2cc8d9c5c236c2cc00 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 4 Dec 2022 20:24:48 +0300 Subject: [PATCH] Initial commit --- .editorconfig | 9 ++++ .gitattributes | 7 +++ .github/workflows/deploy-docs.yml | 48 +++++++++++++++++++++ .github/workflows/verify-formatting.yml | 20 +++++++++ .gitignore | 12 ++++++ LICENSE | 21 +++++++++ README.md | 57 +++++++++++++++++++++++++ src/bonfire.v | 6 +++ v.mod | 7 +++ 9 files changed, 187 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .github/workflows/deploy-docs.yml create mode 100644 .github/workflows/verify-formatting.yml create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 src/bonfire.v create mode 100644 v.mod diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..517d63e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.v] +indent_style = tab +indent_size = 4 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f4011a7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +* text=auto eol=lf +*.bat eol=crlf + +**/*.v linguist-language=V +**/*.vv linguist-language=V +**/*.vsh linguist-language=V +**/v.mod linguist-language=V diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..e8a2d6f --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,48 @@ +name: Deploy Docs + +on: push + +jobs: + deploy-docs: + runs-on: ubuntu-latest + steps: + - name: Set Up V + uses: vlang/setup-v@v1.1 + with: + check-latest: true + + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Checkout Site Repository + uses: actions/checkout@v3 + with: + repository: RGBCube/rgbcube.github.io + path: site + + - name: Generate Docs + run: | + mv ./src ./bonfire.v # For the docs header + cp ./README.md ./bonfire.v/ # For the README to be included in the docs. + v doc -readme -f html -o ./ -m ./bonfire.v + + rm -rf ./site/docs/bonfire || true + mkdir -p ./site/docs/bonfire + cp -r ./_docs/* ./site/docs/bonfire/ + + - name: Add Private Key To SSH Agent + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: ${{ secrets.RGBCUBE_GITHUB_IO_PRIVATE_KEY }} + + - name: Push Docs To GitHub + continue-on-error: true + run: | + cd site + + git config user.name "GitHub Actions" + git config user.email "actions@users.noreply.github.com" + + git add . + git commit -m "Deploy bonfire.v docs" + git push git@github.com:RGBCube/rgbcube.github.io master diff --git a/.github/workflows/verify-formatting.yml b/.github/workflows/verify-formatting.yml new file mode 100644 index 0000000..89e8475 --- /dev/null +++ b/.github/workflows/verify-formatting.yml @@ -0,0 +1,20 @@ +name: Verify Formatting + +on: + - pull_request + - push + +jobs: + verify-formatting: + runs-on: ubuntu-latest + steps: + - name: Set Up V + uses: vlang/setup-v@v1.1 + with: + check-latest: true + + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Verify That The Code Is Formatted + run: v fmt -verify . diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b1dc2aa --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +main +bonfire +*.exe +*.exe~ +*.so +*.dylib +*.dll +bin/ +.DS_Store +.idea/ +.vscode/ +*.iml diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8fd1bb8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022-present RGBCube + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..608df79 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +
+ +

bonfire.v

+ +[Docs](https://rgbcube.github.io/docs/bonfire) + +A Discord API wrapper for the V programming language. + +
+ +## Installation + +After doing these, you can use the module in your V programs by importing `rgbcube.bonfire`. + +### Via VPM + +```bash +v install RGBCube.bonfire +``` + +### Via Git + +```bash +git clone https://github.com/RGBCube/bonfire.v ~/.vmodules/rgbcube/bonfire +``` + +## Examples + +Here are some examples to get you started: + +TODO + +## License + +``` +MIT License + +Copyright (c) 2022-present RGBCube + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` diff --git a/src/bonfire.v b/src/bonfire.v new file mode 100644 index 0000000..93fc87d --- /dev/null +++ b/src/bonfire.v @@ -0,0 +1,6 @@ +module bonfire + +// hello_world prints "Hello, world!" to the console. +pub fn hello_world() { + println('Hello, world!') +} diff --git a/v.mod b/v.mod new file mode 100644 index 0000000..64d8b67 --- /dev/null +++ b/v.mod @@ -0,0 +1,7 @@ +Module { + name: 'bonfire' + description: 'A Discord API wrapper for the V programming language.' + version: '0.0.1' + license: 'MIT' + dependencies: [] +}