Skip to content

Commit 63e2bfa

Browse files
feat: initial Setup (#1)
1 parent 1ff50a6 commit 63e2bfa

39 files changed

+9961
-0
lines changed

.gitignore

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
!.env.example
82+
83+
# parcel-bundler cache (https://parceljs.org/)
84+
.cache
85+
.parcel-cache
86+
87+
# Next.js build output
88+
.next
89+
out
90+
91+
# Nuxt.js build / generate output
92+
.nuxt
93+
dist
94+
95+
# Gatsby files
96+
.cache/
97+
# Comment in the public line in if your project uses Gatsby and not Next.js
98+
# https://nextjs.org/blog/next-9-1#public-directory-support
99+
# public
100+
101+
# vuepress build output
102+
.vuepress/dist
103+
104+
# vuepress v2.x temp and cache directory
105+
.temp
106+
.cache
107+
108+
# Docusaurus cache and generated files
109+
.docusaurus
110+
111+
# Serverless directories
112+
.serverless/
113+
114+
# FuseBox cache
115+
.fusebox/
116+
117+
# DynamoDB Local files
118+
.dynamodb/
119+
120+
# TernJS port file
121+
.tern-port
122+
123+
# Stores VSCode versions used for testing VSCode extensions
124+
.vscode-test
125+
126+
# yarn v2
127+
.yarn/cache
128+
.yarn/unplugged
129+
.yarn/build-state.yml
130+
.yarn/install-state.gz
131+
.pnp.*
132+
133+
dist
134+
storybook-static

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
pnpm-lock.yaml

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"useTabs": true,
3+
"singleQuote": false,
4+
"trailingComma": "none",
5+
"printWidth": 100
6+
}

.storybook/main.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import type { StorybookConfig } from "@storybook/react-vite";
2+
3+
const config: StorybookConfig = {
4+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5+
addons: [
6+
"@storybook/addon-links",
7+
"@storybook/addon-essentials",
8+
"@storybook/addon-onboarding",
9+
"@storybook/addon-interactions",
10+
{
11+
name: "@storybook/addon-styling",
12+
options: {}
13+
}
14+
],
15+
framework: {
16+
name: "@storybook/react-vite",
17+
options: {}
18+
},
19+
docs: {
20+
autodocs: "tag"
21+
}
22+
};
23+
export default config;

.storybook/preview.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import type { Preview } from "@storybook/react";
2+
3+
import { withThemeByClassName } from "@storybook/addon-styling";
4+
5+
/* TODO: update import to your tailwind styles file. If you're using Angular, inject this through your angular.json config instead */
6+
import "../src/index.css";
7+
8+
const preview: Preview = {
9+
parameters: {
10+
actions: { argTypesRegex: "^on[A-Z].*" },
11+
controls: {
12+
matchers: {
13+
color: /(background|color)$/i,
14+
date: /Date$/
15+
}
16+
}
17+
},
18+
19+
decorators: [
20+
// Adds theme switching support.
21+
// NOTE: requires setting "darkMode" to "class" in your tailwind config
22+
withThemeByClassName({
23+
themes: {
24+
light: "light",
25+
dark: "dark"
26+
},
27+
defaultTheme: "light"
28+
})
29+
]
30+
};
31+
32+
export default preview;

package.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "@zenml-io/react-component-library",
3+
"version": "0.1.0",
4+
"description": "React Component Library from Zenml.io",
5+
"keywords": [],
6+
"license": "Apache-2.0",
7+
"author": "ZenML",
8+
"type": "module",
9+
"main": "index.js",
10+
"scripts": {
11+
"build-storybook": "storybook build",
12+
"format": "prettier -w src",
13+
"prepare": "husky install",
14+
"storybook": "storybook dev -p 6006"
15+
},
16+
"lint-staged": {
17+
"*.{css,js,md,ts,jsx,tsx,ts}": "prettier --write"
18+
},
19+
"devDependencies": {
20+
"@storybook/addon-essentials": "^7.3.1",
21+
"@storybook/addon-interactions": "^7.3.1",
22+
"@storybook/addon-links": "^7.3.1",
23+
"@storybook/addon-onboarding": "^1.0.8",
24+
"@storybook/addon-styling": "^1.3.6",
25+
"@storybook/blocks": "^7.3.1",
26+
"@storybook/react": "^7.3.1",
27+
"@storybook/react-vite": "^7.3.1",
28+
"@storybook/testing-library": "^0.2.0",
29+
"autoprefixer": "^10.4.15",
30+
"husky": "^8.0.0",
31+
"lint-staged": "^14.0.0",
32+
"postcss": "^8.4.28",
33+
"prettier": "^3.0.2",
34+
"storybook": "^7.3.1",
35+
"tailwindcss": "^3.3.3",
36+
"tsup": "^7.2.0",
37+
"typescript": "^5.1.6"
38+
},
39+
"peerDependencies": {
40+
"@types/react": "^18.0.0",
41+
"@types/react-dom": "^18.0.0",
42+
"react": "^18.0.0",
43+
"react-dom": "^18.0.0"
44+
}
45+
}

0 commit comments

Comments
 (0)