-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
12,456 additions
and
46 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,30 @@ | ||
# EditorConfig: http://EditorConfig.org | ||
# EditorConfig Properties: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
### defaults | ||
[*] | ||
charset = utf-8 | ||
|
||
# Unix-style newlines with | ||
end_of_line = lf | ||
|
||
# 2 space indentation | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
# remove any whitespace characters preceding newline characters | ||
trim_trailing_whitespace = true | ||
|
||
# newline ending every file | ||
insert_final_newline = true | ||
|
||
# Forces hard line wrapping after the amount of characters specified | ||
max_line_length = off | ||
|
||
### custom for markdown | ||
[*.md] | ||
# do not remove any whitespace characters preceding newline characters | ||
trim_trailing_whitespace = false |
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,8 @@ | ||
dist/ | ||
types/ | ||
docs/ | ||
demo/ | ||
.storybook/ | ||
coverage/ | ||
src/**/*.story.tsx | ||
src/**/*.test.ts |
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,40 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
'prettier', | ||
'plugin:storybook/recommended' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
'ecmaFeatures': { | ||
'jsx': true | ||
}, | ||
'ecmaVersion': 12, | ||
'sourceType': 'module' | ||
}, | ||
plugins: [ | ||
'react', | ||
'@typescript-eslint' | ||
], | ||
overrides: [{ | ||
files: ['*.test.*'], | ||
env: { | ||
jest: true | ||
} | ||
}], | ||
'rules': { | ||
'no-unused-vars': [0], | ||
'indent': ['error', 2], | ||
'react/prop-types': [0], | ||
'linebreak-style': ['error', 'unix'], | ||
'quotes': ['error', 'single'], | ||
'semi': ['error', 'always'] | ||
} | ||
}; |
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
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,7 @@ | ||
# https://github.com/prettier/prettier#configuration-file | ||
semi: true | ||
singleQuote: true | ||
overrides: | ||
- files: ".prettierrc" | ||
options: | ||
parser: json |
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 +1,2 @@ | ||
# reablocks | ||
# reatree | ||
🌴 Tree Component for React |
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 @@ | ||
module.exports = function(api) { | ||
api.cache.forever(); | ||
|
||
const presets = [ | ||
['@babel/preset-env', | ||
{ | ||
targets: { | ||
esmodules: true | ||
} | ||
}], | ||
'@babel/preset-react', | ||
['@babel/typescript', { isTSX: true, allExtensions: true }] | ||
]; | ||
|
||
const plugins = [ | ||
'@babel/proposal-class-properties', | ||
'@babel/proposal-object-rest-spread', | ||
'@babel/plugin-syntax-dynamic-import', | ||
'@babel/plugin-proposal-nullish-coalescing-operator', | ||
'@babel/plugin-proposal-optional-chaining' | ||
]; | ||
|
||
return { | ||
presets, | ||
plugins | ||
}; | ||
}; |
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,104 @@ | ||
{ | ||
"name": "reablocks", | ||
"version": "1.0.0", | ||
"description": "Low level component building blocks for React", | ||
"scripts": { | ||
"build": "rollup -c", | ||
"prettier": "prettier --loglevel warn --write 'src/**/*.{ts,tsx,js,jsx}'", | ||
"start": "start-storybook -p 9009", | ||
"build-storybook": "build-storybook", | ||
"lint": "eslint --ext js,ts,tsx", | ||
"lint:fix": "eslint --ext js,ts,tsx --fix src", | ||
"lint:prettier": "prettier --loglevel warn --write 'src/**/*.{ts,tsx,js,jsx}'" | ||
}, | ||
"source": "src/index.ts", | ||
"main": "dist/index.cjs.js", | ||
"module": "dist/index.esm.js", | ||
"browser": "dist/index.js", | ||
"style": "dist/index.css", | ||
"typings": "dist/index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/reaviz/reablocks.git" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"keywords": [ | ||
"react", | ||
"reactjs", | ||
"tree" | ||
], | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/reaviz/reablocks/issues" | ||
}, | ||
"homepage": "https://github.com/reaviz/reablocks#readme", | ||
"dependencies": { | ||
"classnames": "^2.3.1", | ||
"framer-motion": "^6.2.8" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=16", | ||
"react-dom": ">=16" | ||
}, | ||
"devDependencies": { | ||
"@storybook/addon-essentials": "6.4.20", | ||
"@storybook/addon-storysource": "^6.4.20", | ||
"@storybook/addons": "6.4.20", | ||
"@storybook/react": "6.4.20", | ||
"@storybook/theming": "6.4.20", | ||
"@types/classnames": "^2.3.1", | ||
"@types/lodash": "^4.14.178", | ||
"@types/react": "^17.0.43", | ||
"@types/react-dom": "^17.0.14", | ||
"@typescript-eslint/eslint-plugin": "^4.32.0", | ||
"@typescript-eslint/parser": "^4.32.0", | ||
"autoprefixer": "^9", | ||
"chromatic": "^6.5.3", | ||
"eslint": "^7.32.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-react": "^7.28.0", | ||
"eslint-plugin-react-hooks": "^4.3.0", | ||
"eslint-plugin-storybook": "^0.5.7", | ||
"framer-motion": "^4.1.17", | ||
"husky": "^4.2.5", | ||
"lint-staged": "^10.5.4", | ||
"postcss-nested": "^4", | ||
"postcss-preset-env": "^6.7.0", | ||
"prettier": "^2.6.2", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0", | ||
"rollup": "^2.29.0", | ||
"rollup-plugin-commonjs": "10.1.0", | ||
"rollup-plugin-node-resolve": "5.2.0", | ||
"rollup-plugin-peer-deps-external": "2.2.3", | ||
"rollup-plugin-postcss": "3.1.3", | ||
"rollup-plugin-postcss-modules": "2.0.1", | ||
"rollup-plugin-sourcemaps": "0.6.3", | ||
"rollup-plugin-typescript2": "0.26.0", | ||
"storybook-css-modules-preset": "^1.1.1", | ||
"storybook-dark-mode": "^1.0.9", | ||
"typescript": "^4.1.3" | ||
}, | ||
"prettier": { | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"arrowParens": "avoid", | ||
"bracketSpacing": true, | ||
"jsxBracketSameLine": false, | ||
"printWidth": 80 | ||
}, | ||
"lint-staged": { | ||
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [ | ||
"prettier --write", | ||
"git add" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
} | ||
} |
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,7 @@ | ||
module.exports = { | ||
plugins: [ | ||
require('postcss-nested'), | ||
require('postcss-preset-env')({ stage: 1 }), | ||
require('autoprefixer') | ||
] | ||
}; |
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,60 @@ | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
import sourceMaps from 'rollup-plugin-sourcemaps'; | ||
import typescript from 'rollup-plugin-typescript2'; | ||
import external from 'rollup-plugin-peer-deps-external'; | ||
import postcss from 'rollup-plugin-postcss-modules'; | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
import pkg from './package.json'; | ||
|
||
export default [ | ||
{ | ||
input: pkg.source, | ||
output: [ | ||
{ | ||
file: pkg.browser, | ||
format: 'umd', | ||
name: 'reaselect' | ||
}, | ||
{ | ||
file: pkg.main, | ||
format: 'cjs', | ||
name: 'reaselect' | ||
}, | ||
{ | ||
file: pkg.module, | ||
format: 'esm' | ||
} | ||
], | ||
plugins: [ | ||
external({ | ||
includeDependencies: true | ||
}), | ||
postcss({ | ||
// extract: true, | ||
modules: true, | ||
// writeDefinitions: true, | ||
plugins: [ | ||
require('postcss-nested'), | ||
require('postcss-preset-env')({ stage: 1 }), | ||
require('autoprefixer') | ||
] | ||
}), | ||
typescript({ | ||
clean: true, | ||
exclude: [ | ||
'*.scss', | ||
'*.css', | ||
'*.test.js', | ||
'*.test.ts', | ||
'*.test.tsx', | ||
'*.d.ts', | ||
'**/*.d.ts', | ||
'**/*.story.tsx' | ||
] | ||
}), | ||
resolve(), | ||
commonjs(), | ||
sourceMaps() | ||
] | ||
} | ||
]; |
Oops, something went wrong.