Skip to content
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

Add support for React 18 #271

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
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
Binary file added .package.json.un~
Binary file not shown.
Binary file added .rollup.config.demo.js.un~
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
},
"peerDependencies": {
"prop-types": "^15.5.4",
"react": "15 - 17",
"react-dom": "15 - 17",
"react": "15 - 18",
"react-dom": "15 - 18",
"styled-components": "^5.1.0"
},
"devDependencies": {
Expand Down
129 changes: 129 additions & 0 deletions package.json~
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"name": "react-elastic-carousel",
"version": "0.11.5",
"description": "A flexible and responsive carousel component for react",
"author": "sag1v (Sagiv Ben Giat)",
"license": "MIT",
"repository": "sag1v/react-elastic-carousel",
"main": "dist/index.js",
"module": "dist/index.es.js",
"types": "./dist/index.d.ts",
"jsnext:main": "dist/index.es.js",
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"engines": {
"node": ">=8",
"npm": ">=5"
},
"scripts": {
"start": "concurrently -r -k -s all \"docz dev\" \"yarn run lint:watch\"",
"demo": "concurrently -r -k -s all \"rollup --config rollup.config.demo.js --watch\" \"yarn run lint:watch\"",
"lint:fix": "eslint src/* --fix",
"lint:watch": "esw --watch --fix src/*",
"test": "cross-env CI=1 react-scripts test --env=jsdom",
"test:watch": "react-scripts test --env=jsdom",
"prebuild": "yarn run lint:fix",
"build": "rollup -c",
"build-doc": "docz build",
"deploy-doc": "gh-pages -d demo"
},
"lint-staged": {
"*.js": "eslint src/. --fix"
},
"dependencies": {
"classnames": "^2.2.6",
"react-only-when": "^1.0.2",
"react-swipeable": "^5.5.1",
"resize-observer-polyfill": "1.5.0"
},
"peerDependencies": {
"prop-types": "^15.5.4",
"react": "15 - 17",
"react-dom": "15 - 17",
"styled-components": "^5.1.0"
},
"devDependencies": {
"@babel/core": "^7.3.4",
"@babel/plugin-external-helpers": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.3.4",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-bind": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/preset-env": "^7.3.4",
"@babel/preset-react": "^7.0.0",
"@rollup/plugin-replace": "^2.3.4",
"babel-eslint": "^9.0.0",
"concurrently": "^4.1.0",
"cross-env": "^5.1.4",
"docz": "^2.3.1",
"enzyme": "^3.6.0",
"enzyme-adapter-react-16": "^1.5.0",
"eslint": "5.12.0",
"eslint-config-prettier": "^3.0.1",
"eslint-config-standard": "^12.0.0",
"eslint-config-standard-react": "^7.0.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-prettier": "^2.6.2",
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-react": "^7.10.0",
"eslint-plugin-standard": "^3.1.0",
"eslint-watch": "^4.0.2",
"gatsby-plugin-google-analytics": "^2.1.34",
"gh-pages": "^2.2.0",
"husky": "^4.3.0",
"lint-staged": "^10.5.2",
"prettier": "1.14.2",
"prettier-eslint": "^8.8.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-resizable": "^1.7.5",
"react-scripts": "^2.1.8",
"react-test-renderer": "^16.5.2",
"rollup": "^0.64.1",
"rollup-plugin-alias": "^1.4.0",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-copy": "^3.3.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-postcss": "^1.6.2",
"rollup-plugin-serve": "^1.1.0",
"rollup-plugin-url": "^1.4.0",
"styled-components": "^5.1.0"
},
"files": [
"dist"
],
"keywords": [
"react",
"react-carousel",
"carousel",
"responsive",
"reactjs",
"carrousel",
"slides",
"flexibale",
"rtl",
"right-to-left",
"resize",
"touch"
],
"resolutions": {
"ansi-styles": "^3.2.0"
}
}
1 change: 1 addition & 0 deletions rollup.config.demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default {
serve({
open: true,
contentBase: "demoApp/dist",
port: 5000,
}),
livereload(),
replace({
Expand Down
56 changes: 56 additions & 0 deletions rollup.config.demo.js~
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import postcss from "rollup-plugin-postcss";
import resolve from "rollup-plugin-node-resolve";
import url from "rollup-plugin-url";
import alias from "rollup-plugin-alias";
import serve from "rollup-plugin-serve";
import replace from "@rollup/plugin-replace";
import livereload from 'rollup-plugin-livereload'

import libName from "./libName";

import * as ReactNamedExports from 'react';
import * as ReactIsNamedExports from 'react-is';

export default {
input: `demoApp/src/index.js`,
output: [
{
file: "demoApp/dist/bundle.js",
format: "cjs",
sourcemap: true,
exports: "named",
},
],
plugins: [
alias({
"react-elastic-carousel": `src/${libName}/index.js`,
}),
//external(),
postcss({
modules: false,
}),
url(),
babel({
exclude: "node_modules/**",
plugins: ["@babel/external-helpers"],
}),
resolve(),
commonjs({
include: "node_modules/**",
namedExports: {
"node_modules/react-is/index.js": Object.keys(ReactIsNamedExports),
"node_modules/react/index.js": Object.keys(ReactNamedExports),
},
}),
serve({
open: true,
contentBase: "demoApp/dist",
}),
livereload(),
replace({
"process.env.NODE_ENV": JSON.stringify("production"),
}),
],
};