Skip to content

Commit 8d527cc

Browse files
committed
Merge branch 'dev' of https://github.com/abernier/camera-controls into rm-module-closure-vars
2 parents bb73162 + 11441fc commit 8d527cc

File tree

17 files changed

+2227
-277
lines changed

17 files changed

+2227
-277
lines changed

.github/workflows/chromatic.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Chromatic"
2+
on: push
3+
4+
jobs:
5+
chromatic:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
with:
10+
fetch-depth: 0
11+
- uses: actions/setup-node@v4
12+
with:
13+
cache: "npm"
14+
node-version-file: ".nvmrc"
15+
- run: npm ci
16+
- run: npm run chromatic --exit-once-uploaded --auto-accept-changes main
17+
env:
18+
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: Build and Release to npm
22
on:
33
push:
44
branches:
5-
- 'main'
5+
- "main"
6+
- "canary-*"
67

78
# Cancel any previous run (see: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)
89
concurrency:
910
group: ${{ github.workflow }}-${{ github.ref }}
1011
cancel-in-progress: true
1112

1213
jobs:
13-
1414
release-job:
1515
runs-on: ubuntu-latest
1616
steps:
@@ -58,6 +58,7 @@ jobs:
5858
deploy-job:
5959
needs: release-job
6060
runs-on: ubuntu-latest
61+
if: github.ref == 'refs/heads/main'
6162
permissions:
6263
contents: read
6364
pages: write

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ node_modules
1111
yarn.lock
1212
docs
1313

14-
/dist
14+
/dist
15+
*storybook.log
16+
storybook-static

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
npx lint-staged
2+
npm run typecheck

.releaserc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
branches:
22
- main
3+
- name: canary-*
4+
prerelease: true
5+
channel: canary
36
plugins:
47
- - "@semantic-release/commit-analyzer"
58
- preset: "conventionalcommits"

.storybook/main.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type { StorybookConfig } from '@storybook/html-vite';
2+
3+
const config: StorybookConfig = {
4+
"stories": [
5+
"../src/**/*.mdx",
6+
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
7+
],
8+
"addons": [],
9+
"framework": {
10+
"name": "@storybook/html-vite",
11+
"options": {}
12+
}
13+
};
14+
export default config;

.storybook/preview.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type { Preview } from '@storybook/html-vite';
2+
3+
const preview: Preview = {
4+
parameters: {
5+
controls: {
6+
matchers: {
7+
color: /(background|color)$/i,
8+
date: /Date$/i,
9+
},
10+
},
11+
},
12+
};
13+
14+
export default preview;

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.eslint": true
4+
},
5+
}

eslint.config.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import storybook from "eslint-plugin-storybook";
2+
13
import globals from "globals";
24
import tsPlugin from "@typescript-eslint/eslint-plugin";
35
import tsParser from "@typescript-eslint/parser";
@@ -80,7 +82,7 @@ const mdcs = {
8082

8183
export default [
8284
{
83-
files: [ "src/**/*.ts" ],
85+
files: [ "**/*.ts", "**/*.mjs" ],
8486
// ignores: [],
8587
languageOptions: {
8688
parser: tsParser,
@@ -118,5 +120,4 @@ export default [
118120
],
119121
"key-spacing": [ 0 ],
120122
},
121-
},
122-
];
123+
}, ...storybook.configs[ "flat/recommended" ] ];

0 commit comments

Comments
 (0)