2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-15 11:59:37 +03:00

chore: migrate to changeset (#182)

* fix: initial support to changeset

* fix: changeset config

* fix: vue3 changeset

* feat: add github publish action for changeset
This commit is contained in:
Nikolay Kost
2023-07-24 05:16:14 +03:00
committed by GitHub
parent ee044f3085
commit 49065d239b
6 changed files with 2814 additions and 449 deletions
+8
View File
@@ -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
View File
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "JiLiZART/BBob" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
+56
View File
@@ -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
View File
@@ -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 }}
+2695 -449
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -13,6 +13,7 @@
"test": "npm run build && nx run-many --target=link && nx run-many --target=test",
"cover": "nx run-many --target=cover",
"build": "nx run-many --target=build",
"release": "npm build && changeset publish",
"lint": "nx run-many --target=link && npm run build && nx run-many --target=lint"
},
"author": {
@@ -70,5 +71,8 @@
"cover": "@/jest --config ../../jest.config.js --coverage .",
"lint": "@/eslint .",
"bundlesize": "npm run build && @/cross-env NODE_ENV=production @/bundlesize ."
},
"dependencies": {
"@changesets/cli": "^2.26.2"
}
}