Skip to content

feat: 2.0.0 #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
{
"presets": [
["@babel/preset-env", {
"loose": true,
"modules": false,
"targets": "> 0.25%, not dead"
}],
"@babel/preset-react"
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"modules": false,
"targets": "> 0.25%, not dead"
}
],
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-class-properties"
]
}

"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-class-properties"
],
"ignore": ["node_modules/**"]
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
node_modules/*
dist/*
example/index.js
webpack.config.js
rollup.config.js
43 changes: 16 additions & 27 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
{
"extends": ["airbnb"],
"parser": "babel-eslint",
"plugins": [
"react",
"jsx-a11y",
"import"
],
"env": {
"browser": true
},
"rules": {
"indent": ["error", 4],
"quotes": ["error", "double"],
"max-len": ["error", 350],
"no-unused-vars": ["warn", { "args": "none" }],
"class-methods-use-this": "off",
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/label-has-associated-control": "off",
"camelcase": "error",
"no-return-assign": "off",
"no-noninteractive-element-to-interactive-role": "off",
"no-console": ["error", { "allow": ["log", "error", "warn"] }],
"react/jsx-indent" : ["error", 4],
"react/jsx-indent-props" : ["error", 4],
"import/no-extraneous-dependencies": "off",
"import/prefer-default-export": "off",
"react/destructuring-assignment": "off"
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "prettier"],
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended"],
"rules": {
"prettier/prettier": "error"
},
"env": {
"browser": true
},
"settings": {
"react": {
"version": "detect" // https://github.com/yannickcr/eslint-plugin-react#configuration
}
}
}
7 changes: 6 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
.vscode
.git*

src
example
node_modules
npm-debug.log
yarn-debug.log
yarn-error.log
yarn-error.log
demo.gif
rollup.config.js
webpack.config.js
tsconfig.json
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dist
src
example
webpack.config.js
*.json
*.md
.babelrc
14 changes: 14 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"tabWidth": 2,
"singleQuote": true,
"printWidth": 120,
"bracketSpacing": true,
"jsxBracketSameLine": true,
"useTabs": false,
"semi": true,
"requirePragma": false,
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "ignore",
"endOfLine": "auto",
"trailingComma": "none"
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

2.0.0 (November 15, 2020)
- development by typescript
- migration functional component

1.0.4 (June 22, 2020)
- add 'onClick' props.
- can handle callback when image was clicked
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
[license-url]: https://github.com/kimcoder/react-simple-image-slider/blob/master/LICENSE

Simple ImageSlider Component for ReactJS v16.0<br>
Simple ImageSlider Component for ReactJS v16.13<br>
- Just Two Elements will be used. (for display images)
- Support GPU Render, by default.
- Support Image Preload.
Expand Down Expand Up @@ -103,7 +103,7 @@ npm run build:watch // build watch mode
// yarn
yarn example
yarn build
yarn buidl:watch
yarn build:watch
```
If you want to run a test app, should build before do that.<br>

Expand Down
1 change: 0 additions & 1 deletion example/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import SimpleImageSlider from "..";

class App extends React.Component {
listSubHeader = <ListSubheader><h1>Slider Settings</h1></ListSubheader>;

toggleOptions = ["useGPURender", "showNavs", "showBullets"];

images = [
Expand Down
72 changes: 30 additions & 42 deletions example/index.js

Large diffs are not rendered by default.

30 changes: 0 additions & 30 deletions index.d.ts

This file was deleted.

Loading