-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from inkonchain/feat/init
feat: initial repo, basic button with Storybook
- Loading branch information
Showing
22 changed files
with
5,416 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @inkonchain/developers-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "Basic Setup" | ||
description: "Basic setup with pnpm and cache restore" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
run_install: false | ||
|
||
- name: Setup Node 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
cache: "pnpm" | ||
|
||
- name: Add pnpm store path to env var | ||
id: pnpm-cache | ||
shell: bash | ||
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
|
||
- name: Restore Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
**/node_modules | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: PR Checks | ||
on: [pull_request] | ||
jobs: | ||
install_modules: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
run_install: false | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
cache: "pnpm" | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: Add pnpm store path to env var | ||
id: pnpm-cache | ||
shell: bash | ||
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- name: Cache node modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
**/node_modules | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
lint: | ||
needs: install_modules | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/base-setup | ||
name: Base Setup | ||
- name: Run linting | ||
run: pnpm run lint | ||
|
||
format: | ||
needs: install_modules | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/base-setup | ||
name: Base Setup | ||
- name: Run formatting | ||
run: pnpm run format:check | ||
|
||
build: | ||
needs: install_modules | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/base-setup | ||
name: Base Setup | ||
- name: Debug Environment Variables | ||
run: env | ||
- name: Building app | ||
run: pnpm run build | ||
- name: Cache build | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: apps/web/.next | ||
key: ${{ runner.os }}-build-store-${{ hashFiles('./apps/web/src') }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist | ||
node_modules | ||
*storybook.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type { StorybookConfig } from "@storybook/react-vite"; | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-onboarding", | ||
"@storybook/addon-essentials", | ||
"@chromatic-com/storybook", | ||
"@storybook/addon-interactions", | ||
"@storybook/addon-themes", | ||
], | ||
framework: { | ||
name: "@storybook/react-vite", | ||
options: {}, | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { Preview, ReactRenderer } from "@storybook/react"; | ||
import { withThemeByDataAttribute } from "@storybook/addon-themes"; | ||
|
||
import "../src/tailwind.css"; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
decorators: [ | ||
withThemeByDataAttribute<ReactRenderer>({ | ||
themes: { | ||
light: "", | ||
dark: "dark", | ||
}, | ||
defaultTheme: "light", | ||
attributeName: "data-theme", | ||
}), | ||
], | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# ink-kit | ||
|
||
Ink Kit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { FlatCompat } from "@eslint/eslintrc"; | ||
import js from "@eslint/js"; | ||
import importsPlugin from "eslint-plugin-import"; | ||
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"; | ||
import reactHooksPlugin from "eslint-plugin-react-hooks"; | ||
import simpleImportSort from "eslint-plugin-simple-import-sort"; | ||
import unusedImports from "eslint-plugin-unused-imports"; | ||
import path from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: js.configs.recommended, | ||
allConfig: js.configs.all, | ||
}); | ||
|
||
export default [ | ||
{ | ||
ignores: ["dist"], | ||
}, | ||
...compat.extends(), | ||
eslintPluginPrettierRecommended, | ||
{ | ||
plugins: { | ||
"simple-import-sort": simpleImportSort, | ||
"unused-imports": unusedImports, | ||
"react-hooks": reactHooksPlugin, | ||
import: importsPlugin, | ||
}, | ||
|
||
rules: { | ||
"react-hooks/exhaustive-deps": "error", | ||
|
||
"import/newline-after-import": [ | ||
"error", | ||
{ | ||
count: 1, | ||
}, | ||
], | ||
|
||
"unused-imports/no-unused-imports": "error", | ||
|
||
"simple-import-sort/imports": [ | ||
"error", | ||
{ | ||
groups: [ | ||
["^react", "^@?\\w"], | ||
["^(@)(/.*|$)"], | ||
["^\\u0000"], | ||
["^\\.\\.(?!/?$)", "^\\.\\./?$"], | ||
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"], | ||
["^.+\\.?(css)$"], | ||
], | ||
}, | ||
], | ||
|
||
"simple-import-sort/exports": "error", | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"name": "@inkonchain/ink-kit", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.es.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"/dist" | ||
], | ||
"scripts": { | ||
"build": "tsc && vite build", | ||
"storybook": "storybook dev -p 6006", | ||
"build-storybook": "storybook build", | ||
"lint": "eslint", | ||
"lint:fix": "eslint --fix", | ||
"format": "prettier --write \"**/*.{ts,tsx,md,mdx,css,scss}\"", | ||
"format:check": "prettier --check \"**/*.{ts,tsx,md,mdx,css,scss}\"", | ||
"test": "playwright test", | ||
"fix:all": "pnpm run lint:fix && pnpm run format" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@chromatic-com/storybook": "^3.2.2", | ||
"@storybook/addon-essentials": "^8.4.2", | ||
"@storybook/addon-interactions": "^8.4.2", | ||
"@storybook/addon-onboarding": "^8.4.2", | ||
"@storybook/addon-themes": "^8.4.2", | ||
"@storybook/blocks": "^8.4.2", | ||
"@storybook/react": "^8.4.2", | ||
"@storybook/react-vite": "^8.4.2", | ||
"@storybook/test": "^8.4.2", | ||
"@types/react": "^18.3.12", | ||
"autoprefixer": "^10.4.20", | ||
"eslint": "^9.14.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.31.0", | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"eslint-plugin-react-hooks": "^5.0.0", | ||
"eslint-plugin-simple-import-sort": "^12.1.1", | ||
"eslint-plugin-unused-imports": "^4.1.4", | ||
"postcss": "^8.4.47", | ||
"prettier": "^3.3.3", | ||
"react": "^18.3.1", | ||
"storybook": "^8.4.2", | ||
"tailwindcss": "^3.4.14", | ||
"tslib": "^2.8.1", | ||
"typescript": "^5.6.3", | ||
"vite": "^5.4.10", | ||
"vite-plugin-dts": "^4.3.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18" | ||
}, | ||
"dependencies": { | ||
"clsx": "^2.1.1", | ||
"tailwind-merge": "^2.5.4" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
Oops, something went wrong.