Skip to content

Commit

Permalink
Merge pull request #902 from 3YOURMIND/make-vue-use-tippy-module
Browse files Browse the repository at this point in the history
fix(build): make yoco and vue-use-tippy esm by default
  • Loading branch information
Isokaeder authored Mar 15, 2024
2 parents e90a97b + b3e9d2f commit 62cee34
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 27 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,21 @@ jobs:
- run: ./scripts/build-kotti.sh
- name: Run Publint
run: yarn run check:publint
gh-pages-dry-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ hashFiles('**/yarn.lock') }}
- name: Install modules
run: yarn install --frozen-lockfile
- name: Build Kotti & its dependencies
run: ./scripts/build-kotti.sh
- name: Build @3yourmind/documentation
run: yarn workspace @3yourmind/documentation run build
16 changes: 8 additions & 8 deletions packages/vue-use-tippy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"exports": {
".": {
"import": {
"types": "./dist/mjs/index.d.mts",
"default": "./dist/mjs/index.mjs"
"types": "./dist/mjs/index.d.ts",
"default": "./dist/mjs/index.js"
},
"require": {
"types": "./dist/cjs/index.d.ts",
"default": "./dist/cjs/index.js"
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
}
},
Expand All @@ -36,8 +36,8 @@
"vue-composition-api"
],
"license": "MIT",
"main": "./dist/cjs/index.js",
"module": "./dist/mjs/index.mjs",
"main": "./dist/cjs/index.cjs",
"module": "./dist/mjs/index.js",
"name": "@3yourmind/vue-use-tippy",
"peerDependencies": {
"vue": "^2.7"
Expand All @@ -53,7 +53,7 @@
"build": "./scripts/build.sh",
"check:publint": "publint"
},
"type": "commonjs",
"types": "./dist/cjs/index.d.ts",
"type": "module",
"types": "./dist/mjs/index.d.ts",
"version": "2.0.0"
}
10 changes: 5 additions & 5 deletions packages/vue-use-tippy/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ rm -rf dist
# build cjs (common JS) and mjs (esm)
tsc --build --verbose ./tsconfig.cjs.json ./tsconfig.mjs.json

# hack: add mjs file extensions since package is type commonjs
pushd dist/mjs
mv index.js index.mjs
mv index.js.map index.mjs.map
mv index.d.ts index.d.mts
# hack: add cjs file extensions since package is type module
pushd dist/cjs
mv index.js index.cjs
mv index.js.map index.cjs.map
mv index.d.ts index.d.cts
popd
16 changes: 8 additions & 8 deletions packages/yoco/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"exports": {
".": {
"import": {
"types": "./dist/mjs/index.d.mts",
"default": "./dist/mjs/index.mjs"
"types": "./dist/mjs/index.d.ts",
"default": "./dist/mjs/index.js"
},
"require": {
"types": "./dist/cjs/index.d.ts",
"default": "./dist/cjs/index.js"
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
},
"./style.css": {
Expand All @@ -48,16 +48,16 @@
"font"
],
"license": "MIT",
"main": "./dist/cjs/index.js",
"module": "./dist/mjs/index.mjs",
"main": "./dist/cjs/index.cjs",
"module": "./dist/mjs/index.js",
"name": "@3yourmind/yoco",
"repository": "git+https://github.com/3YOURMIND/kotti.git",
"scripts": {
"build": "./scripts/build.sh",
"check:publint": "publint"
},
"style": "./style.css",
"type": "commonjs",
"types": "./dist/mjs/index.d.mts",
"type": "module",
"types": "./dist/mjs/index.d.ts",
"version": "2.4.6"
}
12 changes: 6 additions & 6 deletions packages/yoco/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ rm -rf dist
tsc --build --verbose ./tsconfig.cjs.json ./tsconfig.mjs.json

# generate icon font
node --unhandled-rejections=strict dist/cjs/generate.js
node --unhandled-rejections=strict dist/mjs/generate.js
rm -f dist/{cjs,mjs}/generate.*

# hack: add mjs file extensions since package is type commonjs
pushd dist/mjs
mv index.js index.mjs
mv index.js.map index.mjs.map
mv index.d.ts index.d.mts
# hack: add cjs file extensions since package is type module
pushd dist/cjs
mv index.js index.cjs
mv index.js.map index.cjs.map
mv index.d.ts index.d.cts
popd

0 comments on commit 62cee34

Please sign in to comment.