Skip to content

Commit

Permalink
feat: 🎸 init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vingeraycn committed Apr 25, 2022
1 parent 37051c3 commit 2fde58f
Show file tree
Hide file tree
Showing 15 changed files with 3,627 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> 1%
last 2 versions
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bin/**
build/**
lib/**
node_modules/**
32 changes: 32 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'react-hooks'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:prettier/recommended',
],
rules: {
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react/self-closing-comp': 'error',
'react/prop-types': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
settings: {
react: {
version: 'detect',
},
},
env: {
node: true,
browser: true,
},
}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.cache
dist/
*.log
node_modules/

.idea/
.vscode/
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 80,
"semi": false,
"singleQuote": true,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "all"
}
3 changes: 3 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['stylelint-prettier/recommended'],
}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# ruuri

Any draggable layout supported based muuri for react.

## Features

## Get Started

```bash
yarn add ruuri muuri
```
69 changes: 69 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"name": "ruuri",
"version": "0.1.1",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"files": [
"./dist"
],
"scripts": {
"prebuild": "rm -rf dist",
"build:components": "npx tsc src/* --declaration --jsx react-jsx --jsxImportSource @emotion/react --skipLibCheck --moduleResolution node",
"build:cjs": "yarn build:components --outDir dist/cjs/ --module commonjs",
"build:esm": "yarn build:components --outDir dist/esm/ --module esnext",
"build": "yarn prebuild && yarn build:cjs && yarn build:esm",
"serve": "vite preview",
"cz": "yarn format && git add . && git cz",
"czp": "yarn cz && git push -u origin HEAD",
"check-deps": "npx npm-check-updates",
"upgrade-deps": "npx npm-check-updates -u && yarn",
"lint": "prettier --check .",
"format": "yarn lint --write",
"prepare": "husky install",
"postversion": "git push && git push --tags"
},
"dependencies": {
"@emotion/react": "^11.9.0",
"clsx": "^1.1.1",
"lodash-es": "^4.17.21",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@types/lodash-es": "^4.17.6",
"@types/node": "^17.0.25",
"@types/react": "^18.0.5",
"@types/react-dom": "^18.0.1",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"@vitejs/plugin-react-refresh": "^1.3.6",
"autoprefixer": "^10.4.4",
"commitizen": "^4.2.4",
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.4.0",
"git-cz": "^4.8.0",
"husky": "^7.0.4",
"postcss": "^8.4.12",
"prettier": "^2.6.2",
"prettier-plugin-organize-imports": "^2.3.4",
"stylelint": "^14.7.1",
"stylelint-config-standard": "^25.0.0",
"stylelint-prettier": "^2.0.0",
"typescript": "^4.6.3",
"vite": "^2.9.5"
},
"peerDependencies": {
"muuri": "^0.9.5",
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"config": {
"commitizen": {
"path": "git-cz"
}
}
}
5 changes: 5 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {},
},
}
27 changes: 27 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"target": "ESNext",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"types": ["vite/client", "node"],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "ESNext",
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"jsxImportSource": "@emotion/react",
"importHelpers": true,
"outDir": "dist",
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"include": ["**/*.ts", "**/*.tsx", "*.ts"]
}
25 changes: 25 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import reactRefresh from '@vitejs/plugin-react-refresh'
import path from 'path'
import { defineConfig } from 'vite'
import pkg from './package.json'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [reactRefresh()],
esbuild: {
jsxFactory: 'jsx',
jsxInject: `
import React from 'react'
import { jsx } from '@emotion/react'
`,
},
build: {
lib: {
name: pkg.name,
entry: path.resolve(__dirname, 'src/index.ts'),
},
rollupOptions: {
external: ['react', 'react-dom'],
},
},
})
Loading

0 comments on commit 2fde58f

Please sign in to comment.