Skip to content

Commit 3149559

Browse files
authored
Merge pull request #69 from it-at-m/main
update beta-branch
2 parents be981f0 + 5048d42 commit 3149559

File tree

105 files changed

+18090
-6677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+18090
-6677
lines changed

.eslintrc.cjs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/* eslint-env node */
2-
require('@rushstack/eslint-patch/modern-module-resolution')
2+
require("@rushstack/eslint-patch/modern-module-resolution");
33

44
module.exports = {
55
root: true,
6-
'extends': [
7-
'plugin:vue/vue3-essential',
8-
'eslint:recommended',
9-
'@vue/eslint-config-typescript',
10-
'@vue/eslint-config-prettier/skip-formatting'
6+
extends: [
7+
"plugin:vue/vue3-essential",
8+
"eslint:recommended",
9+
"@vue/eslint-config-typescript",
10+
"@vue/eslint-config-prettier/skip-formatting",
1111
],
1212
parserOptions: {
13-
ecmaVersion: 'latest'
14-
}
15-
}
13+
ecmaVersion: "latest",
14+
},
15+
};

.github/workflows/build.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ jobs:
1616
registry-url: "https://registry.npmjs.org"
1717
- run: npm ci # install dependencies
1818
- run: npm run build # build library
19-
- run: npm run docs:build # build docs
19+
- run: npm run build-storybook # build docs
2020
- name: upload library artifacts
2121
uses: actions/upload-artifact@v4
2222
with:
2323
name: library_dist
2424
path: ./dist
25-
- name: upload vitepress artifacts
25+
- name: upload storybook artifacts
2626
uses: actions/upload-artifact@v4
2727
with:
28-
name: vitepress_dist
29-
path: ./docs/.vitepress/dist
28+
name: storybook_dist
29+
path: ./storybook-static
3030

3131
deploy-npm:
3232
runs-on: ubuntu-latest
@@ -71,11 +71,11 @@ jobs:
7171
- name: Download build-results
7272
uses: actions/download-artifact@v4
7373
with:
74-
name: vitepress_dist
75-
path: ./docs/.vitepress/dist
74+
name: storybook_dist
75+
path: ./storybook-static
7676
- name: Deploy to GitHub Pages
7777
uses: peaceiris/actions-gh-pages@v4
7878
id: deployment
7979
with:
8080
github_token: ${{ secrets.GITHUB_TOKEN }}
81-
publish_dir: ./docs/.vitepress/dist
81+
publish_dir: ./storybook-static

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ coverage
2828
*.sw?
2929

3030
*.tsbuildinfo
31+
32+
storybook-static

.prettierignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Folders
2+
.github
3+
.idea
4+
.vscode
5+
dist
6+
public
7+
storybook-static
8+
9+
# Files
10+
package.json
11+
package-lock.json
12+
.gitignore
13+
.npmignore
14+
.prettierignore
15+
16+
# Readme
17+
LICENSE
18+
CODE_OF_CONDUCT.md
19+
README.md

.prettierrc.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
{
2-
"$schema": "https://json.schemastore.org/prettierrc",
3-
"semi": false,
4-
"tabWidth": 2,
5-
"singleQuote": true,
6-
"printWidth": 100,
7-
"trailingComma": "none"
8-
}
1+
"@muenchen/prettier-codeformat"

.releaserc.js

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
const { promisify } = require("util");
2+
const dateFormat = require("dateformat");
3+
const { join } = require("node:path");
4+
const readFileAsync = promisify(require("fs").readFile);
5+
6+
const TEMPLATE_DIR =
7+
"node_modules/semantic-release-gitmoji/lib/assets/templates";
8+
// the *.hbs template and partials should be passed as strings of contents
9+
const template = readFileAsync(join(TEMPLATE_DIR, "default-template.hbs"));
10+
const commitTemplate = readFileAsync(join(TEMPLATE_DIR, "commit-template.hbs"));
11+
12+
module.exports = {
13+
branches: [
14+
"main",
15+
"+([0-9])?(.{+([0-9]),x}).x",
16+
"next",
17+
"next-major",
18+
{
19+
name: "alpha",
20+
prerelease: true,
21+
},
22+
{
23+
name: "beta",
24+
prerelease: true,
25+
},
26+
],
27+
plugins: [
28+
[
29+
"semantic-release-gitmoji",
30+
{
31+
releaseRules: {
32+
major: [":boom:"],
33+
minor: [":sparkles:"],
34+
patch: [":bug:", ":ambulance:", ":lock:", ":lipstick"],
35+
},
36+
releaseNotes: {
37+
template,
38+
partials: { commitTemplate },
39+
helpers: {
40+
datetime: function (format = "UTC:yyyy-mm-dd") {
41+
return dateFormat(new Date(), format);
42+
},
43+
},
44+
issueResolution: {
45+
template: "{baseUrl}/{owner}/{repo}/issues/{ref}",
46+
baseUrl: "https://github.com",
47+
source: "github.com",
48+
removeFromCommit: false,
49+
regex: /#\d+/g,
50+
},
51+
},
52+
},
53+
],
54+
"@semantic-release/npm",
55+
[
56+
"@semantic-release/github",
57+
{
58+
assets: [
59+
{
60+
path: "dist/muc-patternlab-vue.es.js",
61+
label: "JS distribution",
62+
},
63+
{
64+
path: "dist/assets/temporary/muenchende-style.css",
65+
label: "CSS distribution",
66+
},
67+
{
68+
path: "dist/assets/temporary/muenchende-fontfaces.css",
69+
label: "CSS fontface distribution",
70+
},
71+
{
72+
path: "dist/assets/temporary/muc-icons.svg",
73+
label: "SVG sprite distribution",
74+
},
75+
],
76+
},
77+
],
78+
],
79+
};

.releaserc.json

Lines changed: 0 additions & 44 deletions
This file was deleted.

.storybook/MucTheme.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { create } from '@storybook/theming/create';
2+
3+
export default create({
4+
base: 'light',
5+
brandTitle: 'muc-patternlab-vue',
6+
brandUrl: 'https://github.com/it-at-m/muc-patternlab-vue',
7+
brandImage: './muc-patternlab-vue.png',
8+
brandTarget: '_blank',
9+
});

.storybook/main.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { StorybookConfig } from "@storybook/vue3-vite";
2+
3+
/**
4+
* Load Muc-SVG-Sprite and inject it into storybook-Preview.
5+
*/
6+
const fs = require("fs");
7+
const path = require("path");
8+
const mucIconsSvg = fs.readFileSync(
9+
path.resolve(__dirname, "../public/assets/temporary/muc-icons.svg"),
10+
"utf8"
11+
);
12+
13+
const config: StorybookConfig = {
14+
stories: ["../docs/*.mdx", "../src/components/**/*.stories.ts"],
15+
staticDirs: ["../public", "../docs/images"],
16+
addons: [
17+
"@storybook/addon-links",
18+
"@storybook/addon-essentials",
19+
"@storybook/addon-interactions",
20+
"@storybook/addon-a11y",
21+
"@storybook/addon-docs",
22+
],
23+
framework: {
24+
name: "@storybook/vue3-vite",
25+
options: {},
26+
},
27+
previewBody: (body) => `
28+
${body}
29+
${mucIconsSvg}
30+
`,
31+
docs: {
32+
autodocs: "tag",
33+
},
34+
};
35+
36+
export default config;

.storybook/manager.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { addons } from '@storybook/manager-api';
2+
import mucTheme from './MucTheme';
3+
4+
addons.setConfig({
5+
theme: mucTheme,
6+
});

0 commit comments

Comments
 (0)