Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module.exports = {
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
"plugin:@typescript-eslint/recommended",
"plugin:storybook/recommended"
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]

jobs:
test:
name: Test
runs-on: ubuntu-latest

strategy:
matrix:
bun-version: [latest]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ matrix.bun-version }}

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run tests
run: bun run test

- name: Build
run: bun run build

- name: Check build
run: |
if [ ! -d "dist" ]; then
echo "Build failed - dist directory not found"
exit 1
fi
65 changes: 0 additions & 65 deletions .github/workflows/documentation.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/node.js.yml

This file was deleted.

91 changes: 39 additions & 52 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,51 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Node.js Package
name: Publish

on:
release:
types: [created]
types: [published]

jobs:
build:
publish:
name: Publish to NPM
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Setup Node.js for npm
uses: actions/setup-node@v4
with:
node-version: 12
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
notify-discord:
if: "!github.event.release.prerelease"
needs: publish-npm
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./ci/discord
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm start
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
GIT_VERSION_TAG: ${{ github.event.release.tag_name }}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
node-version: 20.x
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Test
run: bun run test

- name: Build
run: bun run build

- name: Verify build
run: |
if [ ! -d "dist" ]; then
echo "❌ Build failed"
exit 1
fi
echo "✅ Build verified"

- name: Publish to NPM
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ node_modules
/e2e/public/resources
yarn.lock
/.idea
.DS_Store
*storybook.log
storybook-static
DirectorCastRipper
ProjectorRays
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.0.0
26 changes: 26 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@


/** @type { import('@storybook/react-vite').StorybookConfig } */
const config = {
"stories": [
"../src/**/*.mdx",
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
],
"addons": [
"@storybook/addon-docs"
],
"framework": {
"name": "@storybook/react-vite",
"options": {}
},
viteFinal: async (config) => {
// Remove the problematic aliases from the main vite config
if (config.resolve?.alias) {
delete config.resolve.alias.buffer;
delete config.resolve.alias.timers;
}

return config;
}
};
export default config;
13 changes: 13 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @type { import('@storybook/react-webpack5').Preview } */
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
Loading