Skip to content

Commit

Permalink
build: setup changesets
Browse files Browse the repository at this point in the history
Set `@example/design-tokens` to private to prevent publishing from the
example repo

Remove all references to lerna-lite
  • Loading branch information
matijs committed Aug 15, 2024
1 parent 5c59030 commit 6485ed6
Show file tree
Hide file tree
Showing 7 changed files with 514 additions and 1,793 deletions.
25 changes: 25 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Changeset sjabloon

Kopieer en plak het onderstaande sjabloon. Je kunt hiervoor de kopieer knop linksboven in het template gebruiken.

```markdown
---
'@example/<package-name>': major
---

Beschrijving
```

Vul tussen de twee sets `---` in voor welke packages je allemaal veranderingen hebt doorgevoerd. Zet elk package tussen
dubbele aanhalingstekens op een nieuwe regel.

Gebruik:

- `"@example/<package-name>": major` voor breaking changes
- `"@example/<package-name>": minor` voor nieuwe features
- `"@example/<package-name>": patch` voor bug fixes

Beschrijf na de tweede set `---` welke veranderingen je hebt doorgevoerd.

Geef bij breaking changes aan **wat** er veranderd is, **waarom** de verandering nodig was en **hoe** gebruikers van het
package hun code moeten aanpassen.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
18 changes: 7 additions & 11 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,21 +163,17 @@ jobs:
- name: "Continuous Deployment: build"
run: pnpm run --if-present build

- name: "Continuous Deployment: publish to GitHub repository"
- name: "Continuous Deployment: publish to the NPM repository"
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: "NL Design System"
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
GIT_COMMITTER_NAME: "NL Design System"
run: |
git push --set-upstream origin HEAD
pnpm run release
- name: "Continuous Deployment: publish to npm"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
pnpm run publish
pnpm config delete "//registry.npmjs.org/:_authToken"
with:
commit: "docs(release): design system packages"
setupGitUser: false
title: "docs(release): design system packages"
publish: "pnpm run publish:changeset"
16 changes: 0 additions & 16 deletions lerna.json

This file was deleted.

24 changes: 10 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
"./proprietary/*"
],
"devDependencies": {
"@lerna-lite/cli": "3.8.0",
"@lerna-lite/publish": "3.8.0",
"@lerna-lite/run": "3.8.0",
"@lerna-lite/version": "3.8.0",
"@changesets/cli": "2.27.7",
"@types/node": "22.2.0",
"@typescript-eslint/eslint-plugin": "8.1.0",
"@typescript-eslint/parser": "8.1.0",
Expand All @@ -49,8 +46,8 @@
"typescript": "5.5.4"
},
"scripts": {
"build": "lerna run build",
"clean": "lerna run clean",
"build": "pnpm --recursive run build",
"clean": "pnpm --recursive run clean",
"lint": "npm-run-all --continue-on-error lint:** lint-workspaces",
"lint:css": "stylelint --allow-empty-input '**/*.{css,scss}'",
"lint:js": "eslint --ext .js,.cjs,.mjs,.json,.jsx,.mdx,.ts,.tsx --report-unused-disable-directives .",
Expand All @@ -61,22 +58,21 @@
"lint-fix:css": "stylelint --fix '**/*.{css,scss}'",
"lint-fix:js": "eslint --ext .js,.cjs,.mjs,.json,.jsx,.mdx,.ts,.tsx --fix --report-unused-disable-directives .",
"lint-fix:md": "markdownlint --fix '**/*.md'",
"lint-workspaces": "lerna run --no-bail lint",
"lint-build": "lerna run --no-bail lint-build",
"lint-workspaces": "pnpm --recursive --if-present run lint",
"lint-build": "pnpm --recursive --if-present run lint-build",
"prepare": "husky",
"prettier": "prettier --write .",
"publish": "lerna publish from-package --yes",
"release": "lerna version prerelease --conventional-prerelease --no-changelog --no-private --yes",
"start": "node_modules/http-server/bin packages/storybook/dist/",
"publish:changeset": "changeset publish",
"start": "http-server packages/storybook/dist/",
"storybook": "npm-run-all --parallel watch:**",
"test": "pnpm run test-workspaces",
"test-update": "npm-run-all --sequential clean lint build test",
"test-workspaces": "lerna run --no-bail test",
"test-workspaces": "pnpm --recursive --if-present run test",
"update-patch": "npm-check-updates --configFileName .ncurc.patch.cjs",
"update-minor": "npm-check-updates --configFileName .ncurc.minor.cjs",
"update-major": "npm-check-updates --configFileName .ncurc.major.cjs",
"watch:storybook": "lerna run build:stencil && lerna run build:style-dictionary && pnpm --filter ./packages/storybook run storybook",
"watch:style-dictionary": "lerna run watch:style-dictionary"
"watch:storybook": "pnpm --filter @example/web-components-stencil run build:stencil && pnpm --filter @example/design-tokens run build:style-dictionary && pnpm --filter ./packages/storybook run storybook",
"watch:style-dictionary": "pnpm --filter @example/design-tokens run watch:style-dictionary"
},
"dependencies": {
"http-server": "14.1.1"
Expand Down
Loading

0 comments on commit 6485ed6

Please sign in to comment.