diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..d879c364 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,38 @@ +name: Release + +on: + push: + branches: + - production + +jobs: + release: + name: Release + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Reconfigure git to use HTTP authentication + run: > + git config --global url."https://github.com/".insteadOf + ssh://git@github.com/ + - name: Install dependencies + run: npm ci --ignore-scripts + - name: Run linters + run: npm run lint + - name: Build + run: npm run pub:build + - name: Expose build + run: npm run pub:expose + - name: Release + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..c6b9e862 --- /dev/null +++ b/.npmignore @@ -0,0 +1,34 @@ +*.code-workspace +.github +.husky +.vscode +.netlify +dist +examples +src +public +functions +coverage +test + +.env* + +.eslintignore +.editorconfig +.browserslistrc +.eslintrc.js +.stylelintrc.js +.gitattributes +.prettierignore +.prettierrc.json +.releaserc.json + +conduct.md +contributing.md +index.md +tsconfig-server.json +tsconfig.json +tsconfig.node.json +vite.config.ts +publish.config.ts +postcss.config.js diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 00000000..7a5024b8 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,6 @@ +{ + "branches": [ + { "name": "production" }, + { "name": "develop", "channel": "develop", "prerelease": true } + ] +} diff --git a/README.md b/README.md index 5794f877..8f209fb0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -

biketag-vue

-

The Official BikeTag App

+

BikeTag-Vue

+
+biketag-vue logo +

Netlify Status @@ -22,9 +24,46 @@

-
-biketag-vue logo -
+

The Official BikeTag component library for Vue 3.

+ +## 🚀 Installation + +Install using your package manager of choice: + +```bash +npm install biketag-vue +``` + +## 📺 Demo + +https://biketag.net/component-playground + +## ⚙️ Usage + +Import the component locally or define it globally and include the css file: + +```vue + + + +``` + +## 📃 Props + +| Name | Type | Default | Description | +| ---------- | ------------------ | ------- | ---------------------------------- | +| `v-model` | `boolean/null` | | Standard two way input | +| `disabled` | `boolean` | false | Makes the component uninteractable | +| `color` | `string` | #3ba13b | Color of the checkbox background | +| `label` | `string/undefined` | | Checkbox label | + + +

BikeTag Vue and The Official BikeTag App

diff --git a/contributing.md b/contributing.md new file mode 100644 index 00000000..c87b2442 --- /dev/null +++ b/contributing.md @@ -0,0 +1,33 @@ +# How to Contribute + +Thanks for taking the time to contribute! + +- [Code of Conduct][code of conduct] + + +## Submitting Changes + +We use [commitizen][commitizen] to enforce [conventional commits][conventional commits]. This enables us to automate both semantic versioning and npm releases. + +Install the `commitizen` command line tool: + +```bash +npm install -g commitizen +``` + +Now simply use `git cz` or just `cz` instead of `git commit` when committing. + +If you prefer not to install the `commitizen` command globally, alternatively you can use `npm run commit` instead of `git commit`. + +## Coding Conventions + +- Prettier is ran and applied automatically as part of a precommit hook, so you don't have to worry about semicolons or trailing commas + +## Inspirations + +This package follows the lead of the Open-Source API [biketag][biketag], with it's configurations for compiling, testing, and contributing to Javascript APIs written in TypeScript. Also, the BikeTag API utilizes the `node-imgur` package to do it's thing, with admiration. + +[commitizen]: https://github.com/commitizen/cz-cli +[conventional commits]: https://www.conventionalcommits.org/ +[code of conduct]: code_of_conduct.md +[biketag]: https://github.com/kneucker/biketag diff --git a/index.html b/index.html index f560c7a3..309a40fc 100644 --- a/index.html +++ b/index.html @@ -21,7 +21,7 @@
- +
- {{ props.foundDescription }} + {{ props.foundDescription }}
- #{{ _foundTagnumber }} - [{{ t('components.biketag.found_at') }}] - + #{{ _foundTagnumber }} + [{{ t('components.biketag.found_at') }}] + {{ props.tag.foundLocation?.length ? props.tag.foundLocation @@ -72,7 +74,7 @@
- {{ _mysteryDescription }} + {{ _mysteryDescription }}
store.getImgurImageSized) @@ -364,7 +367,6 @@ onMounted(() => { position: relative; white-space: break-spaces; padding: 0.5rem; - line-height: 2em; text-transform: uppercase; .found-at { diff --git a/src/components/BikeTagAchievement.vue b/src/components/BikeTagAchievement.vue index 133cd58c..43f87785 100644 --- a/src/components/BikeTagAchievement.vue +++ b/src/components/BikeTagAchievement.vue @@ -12,7 +12,7 @@
-