From a7f0b68f285d11ed85bd66f61d771b604f42d904 Mon Sep 17 00:00:00 2001 From: Joey Date: Wed, 15 Sep 2021 21:55:32 -0600 Subject: [PATCH] Initial commit --- .github/workflows/build.yml | 16 ++++++++++++++++ .gitignore | 11 +++++++++++ LICENSE | 9 +++++++++ README.md | 7 +++++++ examples/example.nim | 1 + nimtemplate.nimble | 8 ++++++++ src/nimtemplate.nim | 3 +++ src/nimtemplate/common.nim | 1 + tests/config.nims | 1 + tests/test.nim | 3 +++ 10 files changed, 60 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 examples/example.nim create mode 100644 nimtemplate.nimble create mode 100644 src/nimtemplate.nim create mode 100644 src/nimtemplate/common.nim create mode 100644 tests/config.nims create mode 100644 tests/test.nim diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1052ef0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,16 @@ +name: Github Actions +on: [push, pull_request] +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + - uses: jiro4989/setup-nim-action@v1 + - run: nimble test -y + - run: nimble test --gc:orc -y diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9e74f1c --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# ignore files with no extention: +* +!*/ +!*.* + +# normal ignores: +*.exe +nimcache +*.pdb +*.ilk +.* diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..325bdaf --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2021 Author + +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..0b5f5ee --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# You can use this nim template to jump start your nim library or project. + +This template includes: +* MIT licence +* src directory and a private common.nim +* test directory +* GitHub Actions to run the tests on GitHub diff --git a/examples/example.nim b/examples/example.nim new file mode 100644 index 0000000..0262224 --- /dev/null +++ b/examples/example.nim @@ -0,0 +1 @@ +## Include an example on how to use your library diff --git a/nimtemplate.nimble b/nimtemplate.nimble new file mode 100644 index 0000000..bd72628 --- /dev/null +++ b/nimtemplate.nimble @@ -0,0 +1,8 @@ +version = "0.0.0" +author = "Your name" +description = "Description of your library" +license = "MIT" + +srcDir = "src" + +requires "nim >= 1.2.2" diff --git a/src/nimtemplate.nim b/src/nimtemplate.nim new file mode 100644 index 0000000..5fcd576 --- /dev/null +++ b/src/nimtemplate.nim @@ -0,0 +1,3 @@ +## Public interface to you library. + +import nimtemplate/common diff --git a/src/nimtemplate/common.nim b/src/nimtemplate/common.nim new file mode 100644 index 0000000..869f4b5 --- /dev/null +++ b/src/nimtemplate/common.nim @@ -0,0 +1 @@ +## Add private variables or functions here that you don't want to export. diff --git a/tests/config.nims b/tests/config.nims new file mode 100644 index 0000000..a119208 --- /dev/null +++ b/tests/config.nims @@ -0,0 +1 @@ +--path:"../src" diff --git a/tests/test.nim b/tests/test.nim new file mode 100644 index 0000000..41fa755 --- /dev/null +++ b/tests/test.nim @@ -0,0 +1,3 @@ +## Put your tests here. + +import nimtemplate