Skip to content

Commit

Permalink
Cleans up the release.
Browse files Browse the repository at this point in the history
  • Loading branch information
KenEucker committed Jan 8, 2024
1 parent b097567 commit 0bc5514
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
Expand All @@ -27,11 +27,11 @@ jobs:
run: npm ci --ignore-scripts
- name: Run linters
run: npm run lint
- name: Build
- name: Run Build
run: npm run pub:build
- name: Expose build
run: npm run pub:expose
- name: Release
- name: Run Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"lint:js": "eslint --ext .ts,.js,.vue src --fix",
"lint:style": "stylelint \"./src/**/*.vue\" \"./src/**/*.scss\" --fix",
"serve": "vite",
"pub:expose": "mv dist/publish.d.ts ./publish.d.ts && mv dist/biketag-vue.umd.js ./biketag-vue.umd.js && mv dist/biketag-vue.mjs ./biketag-vue.mjs && mv dist/style.css ./style.css && mv dist/components ./components && mv dist/common ./common && mv dist/store ./store",
"pub:clear": "rm ./publish.d.ts ./biketag-vue.umd.js ./biketag-vue.mjs ./style.css && rm -rf ./components ./common ./store",
"pub:expose": "mv dist/index.d.ts ./index.d.ts && mv dist/biketag-vue.umd.js ./biketag-vue.umd.js && mv dist/biketag-vue.mjs ./biketag-vue.mjs && mv dist/style.css ./style.css && mv dist/components ./components && mv dist/common ./common && mv dist/store ./store",
"pub:clear": "rm ./index.d.ts ./biketag-vue.umd.js ./biketag-vue.mjs ./style.css && rm -rf ./components ./common ./store",
"pub:build": "vue-tsc && vite build --config publish.config.ts",
"build": "vite build",
"dev:rerun": "npm run dev:clear && npm run dev",
Expand Down Expand Up @@ -136,20 +136,23 @@
"vuejs"
],
"files": [
"dist",
"src/components/"
"biketag-vue.mjs",
"biketag-vue.umd.js",
"components/",
"common/",
"store/"
],
"types": "./dist/index.d.ts",
"main": "./dist/biketag-vue.umd.cjs",
"module": "./dist/biketag-vue.js",
"types": "./index.d.ts",
"main": "./biketag-vue.umd.js",
"module": "./biketag-vue.mjs",
"exports": {
".": {
"import": "./dist/biketag-vue.js",
"require": "./dist/biketag-vue.umd.cjs"
"import": "./biketag-vue.mjs",
"require": "./biketag-vue.umd.js"
},
"./dist/style.css": {
"import": "./dist/style.css",
"require": "./dist/style.css"
"./style.css": {
"import": "./style.css",
"require": "./style.css"
}
}
}
2 changes: 1 addition & 1 deletion publish.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineConfig({
plugins: [vue(), dts()],
build: {
lib: {
entry: path.resolve(__dirname, 'src/publish.ts'),
entry: path.resolve(__dirname, 'src/index.ts'),
name: 'BikeTag',
fileName: 'biketag-vue',
},
Expand Down
3 changes: 3 additions & 0 deletions src/publish.ts → src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import BikeTagMap from './components/BikeTagMap.vue'
import BikeTagMenu from './components/BikeTagMenu.vue'
import BikeTagPlayer from './components/BikeTagPlayer.vue'
import BikeTagQueue from './components/BikeTagQueue.vue'
import { useStore } from './store'

export {
BikeDex,
Expand All @@ -32,4 +33,6 @@ export {
BikeTagMenu,
BikeTagPlayer,
BikeTagQueue,
useStore
}

0 comments on commit 0bc5514

Please sign in to comment.