Skip to content

Commit

Permalink
qual: improve monorepo layout
Browse files Browse the repository at this point in the history
  • Loading branch information
lourot committed Jan 15, 2024
1 parent 4d4cae5 commit c21b430
Show file tree
Hide file tree
Showing 25 changed files with 34 additions and 19 deletions.
1 change: 0 additions & 1 deletion README.md

This file was deleted.

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[<img src="https://vike.dev/vike-readme.svg" align="right" height="90">](https://vike.dev)

# `vike-{vue,pinia}`

Vue-related integrations for [Vike](https://vike.dev):

- [`vike-vue`](packages/vike-vue/)
- [`vike-pinia`](packages/vike-pinia/)

> See also other [Vike extensions](https://vike.dev/vike-packages).
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"scripts": {
"dev": "cd vike-vue/ && pnpm run dev",
"build": "cd vike-vue/ && pnpm run build && cd ../packages/vike-pinia/ && pnpm run build",
"release": "cd vike-vue/ && pnpm run release",
"========= Basics": "",
"dev": "cd ./packages/vike-vue/ && pnpm run dev",
"build": "pnpm --recursive --filter {packages/*} run build",
"========= Release": "",
"release": "cd ./packages/vike-vue/ && pnpm run release",
"release:commit": "cd ./packages/vike-vue/ && pnpm run release:commit",
"========= Clean": "",
"clean": "git clean -Xdf",
"reset": "pnpm run clean && pnpm install && pnpm run build",
Expand Down
4 changes: 3 additions & 1 deletion packages/vike-pinia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"scripts": {
"dev": "tsc --watch",
"build": "rm -rf dist && tsc",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"release": "release-me --git-prefix vike-pinia --changelog-dir packages/vike-pinia/ patch",
"release:commit": "release-me --git-prefix vike-pinia --changelog-dir packages/vike-pinia/ commit"
},
"exports": {
".": "./dist/+config.js",
Expand Down
File renamed without changes.
File renamed without changes.
26 changes: 13 additions & 13 deletions CONTRIBUTING.md β†’ packages/vike-vue/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Build `vike-vue`:

```bash
git clone [email protected]:vikejs/vike-vue
cd vike-vue/ && pnpm install
cd vike-vue/
pnpm install
pnpm build
cd ../
```

> Note that you'll need [pnpm](https://pnpm.io/) for development, which you can install with `$ npm install -g pnpm`.
Expand All @@ -29,25 +29,25 @@ cd ../../

## Releasing

Choose the next version number according to the rules of
[Semantic Versioning](https://semver.org/). Let's assume you are releasing
version `1.2.3`, run:
In order to release the next patch version (`MAJOR.MINOR.PATCH`, see [Semantic Versioning](https://semver.org/)), run:

```bash
cd vike-vue/
pnpm exec release-me v1.2.3
cd ../
cd packages/vike-vue/
pnpm release
cd ../../
```

This will:

- update the version number and dependencies in `package.json`,
- extend [`CHANGELOG.md`](CHANGELOG.md),
- update the `pnpm-lock.yaml` file,
- create a `release: v1.2.3` git commit and push it,
- create a `v1.2.3` git tag and push it,
- create a `release: vike-vue@1.2.3` git commit and push it,
- create a `vike-vue@1.2.3` git tag and push it,
- build the package and publish it to npm.

Extend [`CHANGELOG.md`](CHANGELOG.md) if anything is missing, as the release
script only picks up commits
[that match the pattern of "Feature", "Fix", "Performance Improvement" or "Breaking Changes"](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli).
Extend [`CHANGELOG.md`](CHANGELOG.md) if anything is missing, as the release script:

- only picks up commits
[that match the pattern of "Feature", "Fix", "Performance Improvement" or "Breaking Changes"](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli),
- mistakenly picks up commits touching all packages in this monorepo, not only `vike-vue`.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion vike-vue/package.json β†’ packages/vike-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"scripts": {
"dev": "vite build --watch",
"build": "rm -rf dist/ && vite build",
"release": "release-me patch"
"release": "release-me --git-prefix vike-vue --changelog-dir packages/vike-vue/ patch",
"release:commit": "release-me --git-prefix vike-vue --changelog-dir packages/vike-vue/ commit"
},
"peerDependencies": {
"vike": "^0.4.152",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c21b430

Please sign in to comment.