Skip to content

Commit

Permalink
chore: migrate to changeset (#182)
Browse files Browse the repository at this point in the history
* fix: initial support to changeset

* fix: changeset config

* fix: vue3 changeset

* feat: add github publish action for changeset
  • Loading branch information
JiLiZART authored Jul 24, 2023
1 parent ee044f3 commit 49065d2
Show file tree
Hide file tree
Showing 6 changed files with 14,177 additions and 11,812 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "JiLiZART/BBob" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
56 changes: 56 additions & 0 deletions .changeset/old-apricots-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
"@bbob/cli": major
"@bbob/core": major
"@bbob/html": major
"@bbob/parser": major
"@bbob/plugin-helper": major
"@bbob/preset": major
"@bbob/preset-html5": major
"@bbob/preset-react": major
"@bbob/preset-vue": major
"@bbob/react": major
"@bbob/vue2": major
"@bbob/vue3": major
---

# Vue3 support

Now you can use `@bbob` parser in `vue3`

Example usage

```shell
npm i @bbob/vue3 @bbob/preset-vue
```

```js
import { defineComponent } from 'vue'
import VueBbob from '@bbob/vue3';

Vue.use(VueBbob);
```

```html
<template>
<div class="vue3">
<h2>Generated vue3 here</h2>
<bbob-bbcode container="div" :plugins="plugins">{{ bbcode }}</bbob-bbcode>
</div>
</template>
<script>
import { defineComponent } from 'vue'
import preset from '@bbob/preset-vue'
export default defineComponent({
name: 'App',
data() {
return {
bbcode: 'Text [b]bolded[/b] and [i]Some Name[/i]',
plugins: [
preset()
],
}
}
})
</script>
```
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
publish:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --max-old-space-size=4096
outputs:
published: ${{ steps.changesets.outputs.published }}
steps:
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
commit: 'chore(release): release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading

0 comments on commit 49065d2

Please sign in to comment.