Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Atractorrr/Attraction-FE in…
Browse files Browse the repository at this point in the history
…to refactor/woogie-#ATR-512
  • Loading branch information
woogie0303 committed Aug 17, 2024
2 parents f14a566 + ecb55ca commit 0049f60
Show file tree
Hide file tree
Showing 88 changed files with 6,514 additions and 160 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"scripts": {
"preinstall": "npx only-allow pnpm",
"postinstall": "husky install && pnpm build:icons && pnpm build:ds && pnpm build:utils",
"postinstall": "husky install && pnpm build:icons && pnpm build:ds && pnpm build:utils && pnpm build:ds-hooks && pnpm build:ds-core",
"prepare": "husky install",
"lint": "pnpm -r run lint",
"type": "pnpm -r run type",
Expand All @@ -17,9 +17,12 @@
"build:service": "pnpm -F @attraction/service build",
"build:icons": "pnpm -F @attraction/icons build",
"build:ds": "pnpm -F @attraction/design-system build",
"build:ds-core": "pnpm -F @attraction/ds-core build",
"build:ds-hooks": "pnpm -F @attraction/ds-hooks build",
"build:utils": "pnpm -F @attraction/utils build",
"dev:service": "pnpm -F @attraction/service dev",
"dev:ds": "pnpm -F @attraction/design-system storybook",
"dev:ds-core": "pnpm -F @attraction/ds-core dev",
"start:service": "pnpm -F @attraction/service start"
},
"devDependencies": {
Expand Down
29 changes: 29 additions & 0 deletions packages/design-system/packages/core/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
extends: ['../../../../.eslintrc.cjs', 'plugin:storybook/recommended'],
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: __dirname,
},
rules: {
'import/no-unresolved': [2, { caseSensitive: false }],
'react/require-default-props': 'off',
'react/prop-types': 'off',
'react/jsx-no-constructed-context-values': 'off',
'jsx-a11y/label-has-associated-control': [
2,
{
some: ['nesting', 'id'],
},
],
},
settings: {
'import/resolver': {
typescript: {},
},
},
settings: {
'import/resolver': {
typescript: {},
},
},
}
4 changes: 4 additions & 0 deletions packages/design-system/packages/core/.lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.{js,jsx,ts,tsx}": ["eslint --fix --cache"],
"**/*": "prettier --write . --ignore-unknown"
}
49 changes: 49 additions & 0 deletions packages/design-system/packages/core/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
'@storybook/addon-a11y',
'@storybook/addon-themes',
{
name: 'storybook-addon-sass-postcss',
options: {
rules: [
{
test: /\.s[ac]ss$/,
sideEffects: true,
use: [
require.resolve('style-loader'),
{
loader: require.resolve('css-loader'),
options: {
importLoaders: 2,
},
},
require.resolve('resolve-url-loader'),
{
loader: require.resolve('sass-loader'),
options: {
// Want to add more Sass options? Read more here https://webpack.js.org/loaders/sass-loader/#options
implementation: require.resolve('sass'),
sourceMap: true,
sassOptions: {},
},
},
],
},
],
},
},
],
framework: {
name: '@storybook/react-vite',
options: {},
},
}
export default config
17 changes: 17 additions & 0 deletions packages/design-system/packages/core/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { Preview } from '@storybook/react'

import '../src/token/index.scss'
import '../src/components/index.scss'

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
}

export default preview
66 changes: 66 additions & 0 deletions packages/design-system/packages/core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "@attraction/ds-core",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsup && pnpm -F @attraction/ds-core build:style",
"build:style": "sass --embed-source-map src/components/index.scss:dist/component.css src/token/index.scss:dist/token.css",
"build:storybook": "storybook build",
"test": "vitest --reporter verbose",
"test:ui": "vitest --ui",
"test:coverage": "vitest run --coverage",
"dev": "storybook dev -p 6006"
},
"dependencies": {
"class-variance-authority": "^0.7.0",
"framer-motion": "^11.3.28",
"tsup": "^8.1.0"
},
"devDependencies": {
"@attraction/config": "workspace:^",
"@chromatic-com/storybook": "^1.6.1",
"@storybook/addon-a11y": "^8.2.8",
"@storybook/addon-essentials": "^8.2.8",
"@storybook/addon-interactions": "^8.2.8",
"@storybook/addon-links": "^8.2.8",
"@storybook/addon-onboarding": "^8.2.8",
"@storybook/addon-themes": "^8.2.8",
"@storybook/blocks": "^8.2.8",
"@storybook/react": "^8.2.8",
"@storybook/react-vite": "^8.2.8",
"@storybook/test": "^8.2.8",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/coverage-v8": "^2.0.5",
"@vitest/ui": "^2.0.5",
"css-loader": "^7.1.2",
"eslint-plugin-storybook": "^0.8.0",
"jsdom": "^24.1.1",
"prop-types": "^15.8.1",
"resolve-url-loader": "^5.0.0",
"sass": "^1.77.8",
"sass-loader": "^16.0.0",
"storybook": "^8.2.8",
"storybook-addon-sass-postcss": "^0.3.0",
"style-loader": "^4.0.0",
"vitest": "^2.0.5"
},
"peerDependencies": {
"@attraction/ds-hooks": "workspace:^",
"@attraction/icons": "workspace:^",
"@attraction/utils": "workspace:^",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"keywords": [],
"author": "",
"license": "ISC"
}
Loading

0 comments on commit 0049f60

Please sign in to comment.