Skip to content

Commit 3a7942c

Browse files
committed
hello world
0 parents  commit 3a7942c

File tree

438 files changed

+52111
-0
lines changed

Some content is hidden

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

438 files changed

+52111
-0
lines changed

.eslintrc.cjs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
"eslint:recommended",
6+
"plugin:@typescript-eslint/recommended",
7+
"plugin:react-hooks/recommended",
8+
"plugin:storybook/recommended",
9+
],
10+
ignorePatterns: ["dist", ".eslintrc.cjs"],
11+
parser: "@typescript-eslint/parser",
12+
parserOptions: {
13+
ecmaVersion: "latest",
14+
sourceType: "module",
15+
project: ["./tsconfig.json", "./tsconfig.node.json"],
16+
tsconfigRootDir: __dirname,
17+
},
18+
plugins: ["react-refresh"],
19+
rules: {
20+
"react-refresh/only-export-components": [
21+
"warn",
22+
{ allowConstantExport: true },
23+
],
24+
},
25+
};

.github/workflows/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy to GitHub Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Single deploy job since we're just deploying
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
- run: npm ci
35+
- run: npm run build
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v3
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v2
40+
with:
41+
path: "./dist"
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v2

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
.env
15+
16+
# Editor directories and files
17+
.vscode/*
18+
!.vscode/extensions.json
19+
.idea
20+
.DS_Store
21+
*.suo
22+
*.ntvs*
23+
*.njsproj
24+
*.sln
25+
*.sw?
26+
*storybook.log

.storybook/main.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import type { StorybookConfig } from "@storybook/react-vite";
2+
import path from "path";
3+
4+
const config: StorybookConfig = {
5+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
6+
addons: [
7+
"@storybook/addon-onboarding",
8+
"@storybook/addon-links",
9+
"@storybook/addon-essentials",
10+
"@chromatic-com/storybook",
11+
"@storybook/addon-interactions",
12+
],
13+
framework: {
14+
name: "@storybook/react-vite",
15+
options: {},
16+
},
17+
docs: {
18+
autodocs: true,
19+
},
20+
viteFinal: async (config) => {
21+
if (config.resolve) {
22+
config.resolve.alias = {
23+
...config.resolve.alias,
24+
blocks: path.resolve(__dirname, "/src/blocks"),
25+
icons: path.resolve(__dirname, "/src/icons"),
26+
ui: path.resolve(__dirname, "/src/ui"),
27+
};
28+
}
29+
30+
return config;
31+
},
32+
};
33+
export default config;

.storybook/preview-head.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<link rel="preconnect" href="https://fonts.googleapis.com">
2+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
3+
<link
4+
href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&family=Noto+Serif:ital,wght@0,100..900;1,100..900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap"
5+
rel="stylesheet">
6+
7+
<style>
8+
#storybook-root {
9+
width: 100%;
10+
}
11+
</style>
12+
13+
<script>
14+
// document.documentElement.classList.add("sds-theme-purple")
15+
</script>

.storybook/preview.tsx

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

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SDS + Storybook + Code Connect Demo
2+
3+
Using Figma's [Code Connect](https://github.com/figma/code-connect).
4+
5+
## Codebase setup
6+
7+
- `npm i` to install dependencies
8+
- `npm run app:dev` will run server at [localhost:8000](http://localhost:8000) which renders contents of [App.tsx](src/App.tsx).

figma.config.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"codeConnect": {
3+
"include": ["src/ui/**"],
4+
"exclude": [],
5+
"react": {
6+
"importPaths": {
7+
"src/ui/**/*": "ui",
8+
"src/icons/*": "icons",
9+
"*": "ui"
10+
}
11+
}
12+
}
13+
}

index.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<link rel="preconnect" href="https://fonts.googleapis.com">
8+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9+
<link
10+
href="https://fonts.googleapis.com/css2?family=Inter:[email protected]&family=Noto+Serif:ital,wght@0,100..900;1,100..900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap"
11+
rel="stylesheet">
12+
<title>SDS</title>
13+
</head>
14+
15+
<body>
16+
<div id="root"></div>
17+
<script type="module" src="/src/main.tsx"></script>
18+
</body>
19+
20+
</html>

0 commit comments

Comments
 (0)