Skip to content

Commit

Permalink
Merge pull request #659 from vselvarajijay/hexagonal
Browse files Browse the repository at this point in the history
Hexagonal
  • Loading branch information
vselvarajijay committed Jun 2, 2024
2 parents 4c5ea33 + 4d896f6 commit 8a6514d
Show file tree
Hide file tree
Showing 64 changed files with 24,246 additions and 0 deletions.
20 changes: 20 additions & 0 deletions apps/core/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['plugin:react/recommended', 'standard-with-typescript', 'prettier', 'plugin:storybook/recommended'],
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react'],
rules: {
'react/jsx-key': 'off',
'react/react-in-jsx-scope': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'no-console': 'warn',
},
}
56 changes: 56 additions & 0 deletions apps/core/.github/examples/github-release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
push:
branches:
- main

permissions:
contents: write
packages: write
pull-requests: write

name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Release
id: release
if: ${{ github.ref_name == 'main' }}
uses: google-github-actions/release-please-action@v3
with:
release-type: node
default-branch: main
token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v3
if: ${{ steps.release.outputs.releases_created }}

- name: Install pnpm
uses: pnpm/action-setup@v2
if: ${{ steps.release.outputs.releases_created }}
with:
version: 8

# Setup .npmrc file to publish to npm
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
cache: 'pnpm'
if: ${{ steps.release.outputs.releases_created }}

- name: CI
run: pnpm install --frozen-lockfile
if: ${{ steps.release.outputs.releases_created }}

- name: Build
run: pnpm build:lib
if: ${{ steps.release.outputs.releases_created }}

- name: Publish
run: pnpm publish
if: ${{ steps.release.outputs.releases_created }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55 changes: 55 additions & 0 deletions apps/core/.github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Release
id: release
if: ${{ github.ref_name == 'main' }}
uses: google-github-actions/release-please-action@v3
with:
release-type: node
default-branch: main
token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v3
if: ${{ steps.release.outputs.releases_created }}

- name: Install pnpm
uses: pnpm/action-setup@v2
if: ${{ steps.release.outputs.releases_created }}
with:
version: 8

# Setup .npmrc file to publish to npm
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
if: ${{ steps.release.outputs.releases_created }}

- name: CI
run: pnpm install --frozen-lockfile
if: ${{ steps.release.outputs.releases_created }}

- name: Build
run: pnpm build:lib
if: ${{ steps.release.outputs.releases_created }}

- name: Publish
run: pnpm publish
if: ${{ steps.release.outputs.releases_created }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
30 changes: 30 additions & 0 deletions apps/core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Storybook
storybook-static

# Testing
coverage
1 change: 1 addition & 0 deletions apps/core/.husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
1 change: 1 addition & 0 deletions apps/core/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.18.1
7 changes: 7 additions & 0 deletions apps/core/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 120,
"endOfLine": "auto"
}
22 changes: 22 additions & 0 deletions apps/core/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type { StorybookConfig } from '@storybook/react-vite'
const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-styling',
],
framework: {
name: '@storybook/react-vite',
options: {
builder: {
viteConfigPath: '.storybook/vite.config.ts',
},
},
},
docs: {
autodocs: 'tag',
},
}
export default config
16 changes: 16 additions & 0 deletions apps/core/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { Preview } from '@storybook/react'
import '../src/lib/tailwind/theme.css'

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
}

export default preview
17 changes: 17 additions & 0 deletions apps/core/.storybook/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vitest/config'
import tailwindcss from 'tailwindcss'
import { UserConfigExport } from 'vite'

const app = async (): Promise<UserConfigExport> => {
return defineConfig({
plugins: [react()],
css: {
postcss: {
plugins: [tailwindcss],
},
},
})
}
// https://vitejs.dev/config/
export default app
Loading

0 comments on commit 8a6514d

Please sign in to comment.