Skip to content
Merged
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
78 changes: 78 additions & 0 deletions .codesandbox/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
// These tasks will run in order when initializing your CodeSandbox project.
"setupTasks": [
{
"name": "Install Dependencies",
"command": "pnpm install"
}
],

// These tasks can be run from CodeSandbox. Running one will open a log in the app.
"tasks": {
"dev": {
"name": "dev",
"command": "pnpm run dev",
"runAtStart": true
},
"build": {
"name": "build",
"command": "pnpm run build",
"runAtStart": false
},
"build:docs": {
"name": "build:docs",
"command": "pnpm run build:docs",
"runAtStart": false
},
"test": {
"name": "test",
"command": "pnpm run test",
"runAtStart": false
},
"test:unit": {
"name": "test:unit",
"command": "pnpm run test:unit",
"runAtStart": false
},
"test:unit:web": {
"name": "test:unit:web",
"command": "pnpm run test:unit:web",
"runAtStart": false
},
"test:unit:native": {
"name": "test:unit:native",
"command": "pnpm run test:unit:native",
"runAtStart": false
},
"test:watch": {
"name": "test:watch",
"command": "pnpm run test:watch",
"runAtStart": false
},
"test:tsc": {
"name": "test:tsc",
"command": "pnpm run test:tsc",
"runAtStart": false
},
"test:tsc:watch": {
"name": "test:tsc:watch",
"command": "pnpm run test:tsc:watch",
"runAtStart": false
},
"commit": {
"name": "commit",
"command": "pnpm run commit",
"runAtStart": false
},
"format": {
"name": "format",
"command": "pnpm run format",
"runAtStart": false
},
"release": {
"name": "release",
"command": "pnpm run release",
"runAtStart": false
}
}
}
22 changes: 22 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
12 changes: 0 additions & 12 deletions .eslintrc.json

This file was deleted.

12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
37 changes: 11 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,27 @@ on:
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['10', '12', '14']
name: '[v${{ matrix.node-version }}] lint and test'
name: Lint, typecheck and test

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
- uses: pnpm/action-setup@v3
with:
node-version: ${{ matrix.node-version }}
version: 8

- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v2
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{matrix.node-version}}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{matrix.node-version}}-
${{ runner.os }}-node-
${{ runner.os }}-
node-version: 20
cache: 'pnpm'

- name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci --force

- name: Lint
run: npm run lint
run: pnpm i

- name: Run tests
run: npm run test
run: pnpm run test

- name: Build
env:
BUNDLESIZE_GITHUB_TOKEN: ${{ secrets.BUNDLESIZE }}
run: npm run build
run: pnpm run build
96 changes: 21 additions & 75 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,23 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v2-beta
- uses: pnpm/action-setup@v3
with:
version: 8

- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v2
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{matrix.node-version}}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{matrix.node-version}}-
${{ runner.os }}-node-
${{ runner.os }}-
node-version: 20
cache: 'pnpm'

- name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci --force

- name: Lint
run: npm run lint
run: pnpm i

- name: Run tests
run: npm run test
run: pnpm run test

build-and-release:
runs-on: ubuntu-latest
Expand All @@ -45,72 +37,26 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v2-beta
- uses: pnpm/action-setup@v3
with:
version: 8

- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v2
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{matrix.node-version}}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{matrix.node-version}}-
${{ runner.os }}-node-
${{ runner.os }}-
node-version: 20
cache: 'pnpm'

- name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci --force
run: pnpm i

- name: Build
env:
BUNDLESIZE_GITHUB_TOKEN: ${{ secrets.BUNDLESIZE }}
run: npm run build
run: pnpm run build

- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run release

docs:
runs-on: ubuntu-latest
needs: prepare
name: Documentation

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2-beta

- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-${{matrix.node-version}}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{matrix.node-version}}-
${{ runner.os }}-node-
${{ runner.os }}-

- name: Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci --force

- name: Build storybook
run: npm run build:docs

- name: Deploy
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: docs
FOLDER: docs-build
CLEAN: true
TARGET_FOLDER: docs
run: pnpm run release
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("@significa/prettier-config");
module.exports = require("@significa/prettier-config");
2 changes: 0 additions & 2 deletions .storybook/addons.js

This file was deleted.

13 changes: 0 additions & 13 deletions .storybook/config.js

This file was deleted.

12 changes: 12 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { StorybookConfig } from "@storybook/react-vite";
const config: StorybookConfig = {
stories: ["../docs/**/*.mdx", "../docs/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [

],
framework: {
name: "@storybook/react-vite",
options: {},
},
};
export default config;
3 changes: 3 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script>
window.global = window;
</script>
18 changes: 18 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";

import type { Preview } from "@storybook/react";

const preview: Preview = {
parameters: {

},
decorators: [
(Story) => (
<div>
<Story />
</div>
),
],
};

export default preview;
23 changes: 0 additions & 23 deletions .storybook/webpack.config.js

This file was deleted.

Loading