Skip to content

Commit

Permalink
feat: migrate source code
Browse files Browse the repository at this point in the history
  • Loading branch information
imfelixng committed Apr 7, 2024
1 parent 6cbde6e commit 42740a6
Show file tree
Hide file tree
Showing 14 changed files with 9,978 additions and 47 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ['@commitlint/config-conventional']
}
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx dts lint
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 80,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
}
64 changes: 28 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
],
"repository": {
"type": "git",
"url": "https://github.com/topthithu/react-grid-container-query"
"url": "https://github.com/topexam/react-grid-container-query"
},
"homepage": "https://github.com/topthithu/react-grid-container-query",
"homepage": "https://github.com/topexam/react-grid-container-query",
"keywords": [
"react",
"container query",
Expand All @@ -34,17 +34,6 @@
"storybook": "start-storybook -p 6006",
"test": "dts test --passWithNoTests"
},
"husky": {
"hooks": {
"pre-commit": "dts lint"
}
},
"prettier": {
"printWidth": 80,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
},
"jest": {
"testEnvironment": "jsdom"
},
Expand All @@ -65,33 +54,36 @@
}
],
"devDependencies": {
"@babel/core": "^7.16.7",
"@size-limit/preset-small-lib": "^7.0.5",
"@storybook/addon-essentials": "^6.4.13",
"@babel/core": "^7.24.4",
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@size-limit/esbuild": "^11.1.2",
"@size-limit/esbuild-why": "^11.1.2",
"@size-limit/preset-small-lib": "^11.1.2",
"@storybook/addon-essentials": "^8.0.6",
"@storybook/addon-info": "^5.3.21",
"@storybook/addon-links": "^6.4.13",
"@storybook/addons": "^6.4.13",
"@storybook/react": "^6.4.13",
"@tsconfig/create-react-app": "^1.0.2",
"@tsconfig/recommended": "^1.0.1",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"babel-loader": "^8.2.3",
"dts-cli": "^1.1.6",
"husky": "^7.0.4",
"postcss": "^8.4.6",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-is": "^17.0.2",
"@storybook/addon-links": "^8.0.6",
"@storybook/addons": "^7.6.17",
"@storybook/react": "^8.0.6",
"@tsconfig/create-react-app": "^2.0.4",
"@tsconfig/recommended": "^1.0.6",
"@types/react": "^18.2.74",
"@types/react-dom": "^18.2.24",
"babel-loader": "^9.1.3",
"dts-cli": "^2.0.4",
"husky": "^9.0.11",
"postcss": "^8.4.38",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"rollup-plugin-postcss": "^4.0.2",
"sass": "^1.49.8",
"size-limit": "^7.0.5",
"tslib": "^2.3.1",
"typescript": "^4.5.4"
"sass": "^1.74.1",
"tslib": "^2.6.2",
"typescript": "^5.1.6"
},
"dependencies": {
"clsx": "^1.1.1",
"react-container-query": "^0.12.0"
"clsx": "^2.1.0",
"react-container-query": "^0.13.0"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion src/components/auto-grid.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react';
import clsx from 'clsx';

import styles from '../styles/index.module.scss';
import { EBreakpoint } from '../enums';
import styles from './index.module.scss';

type IMinChildWidthSize = 1 | 2 | 3 | 4 | 5;

Expand Down
2 changes: 1 addition & 1 deletion src/components/grid-item.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import clsx from 'clsx';

import styles from '../styles/index.module.scss';
import styles from './index.module.scss';

type IColSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;

Expand Down
3 changes: 1 addition & 2 deletions src/components/grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import clsx from 'clsx';
import { useContainerQuery } from 'react-container-query';

import { EBreakpoint } from '../enums';

import styles from '../styles/index.module.scss';
import styles from './index.module.scss';

const query = {
[styles['container-xs']]: {
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './breakpoint';
7 changes: 7 additions & 0 deletions src/enums/breakpoint.enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export enum EBreakpoint {
xs = 'xs',
sm = 'sm',
md = 'md',
lg = 'lg',
xl = 'xl',
}
8 changes: 1 addition & 7 deletions src/enums/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
export enum EBreakpoint {
xs = 'xs',
sm = 'sm',
md = 'md',
lg = 'lg',
xl = 'xl',
}
export * from './breakpoint.enum';
Loading

0 comments on commit 42740a6

Please sign in to comment.