Skip to content

Commit

Permalink
Merge pull request #160 from vadymshymko/upgrade-rollup-config
Browse files Browse the repository at this point in the history
Upgrade rollup config
  • Loading branch information
vadymshymko authored May 11, 2023
2 parents e33fd32 + 9c1255e commit c62cfc9
Show file tree
Hide file tree
Showing 5 changed files with 448 additions and 1,907 deletions.
20 changes: 0 additions & 20 deletions babel.config.js

This file was deleted.

20 changes: 6 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-simply-carousel",
"version": "8.5.7",
"version": "9.0.0",
"description": "A simple, lightweight, fully controlled isomorphic (with SSR support) React.js carousel component. Touch enabled and responsive. With support for autoplay and infinity options. Fully customizable",
"files": [
"dist/"
Expand All @@ -10,8 +10,7 @@
"types": "dist/index.d.ts",
"sideEffects": false,
"scripts": {
"build": "rm -rf dist && yarn lint && yarn generate-types && rollup -c",
"generate-types": "tsc --emitDeclarationOnly",
"build": "rm -rf dist && yarn lint && rollup -c",
"lint": "eslint . --ext .tsx",
"prepare": "husky install",
"prepublish": "yarn build",
Expand Down Expand Up @@ -43,18 +42,14 @@
},
"homepage": "https://github.com/vadymshymko/react-simply-carousel#readme",
"devDependencies": {
"@babel/cli": "^7.17.10",
"@babel/core": "^7.17.10",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.18.6",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.1",
"@rollup/plugin-typescript": "^11.1.0",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.21.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint": "^8.14.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.6.0",
Expand All @@ -68,12 +63,9 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rollup": "^3.13.0",
"rollup-plugin-terser": "^7.0.2",
"tslib": "^2.5.0",
"typescript": "^5.0.2"
},
"dependencies": {
"core-js": "^3.8.1"
},
"peerDependencies": {
"@types/react": "^16.8 || ^17 || ^18",
"react": "^16.8 || ^17 || ^18",
Expand Down
13 changes: 5 additions & 8 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* eslint-disable import/no-extraneous-dependencies */
import { nodeResolve } from '@rollup/plugin-node-resolve';
import { terser } from 'rollup-plugin-terser';
import babel from '@rollup/plugin-babel';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';

export default {
input: 'src/index.tsx',
Expand All @@ -22,10 +23,6 @@ export default {
exports: 'auto',
},
],
plugins: [
nodeResolve(),
babel({ babelHelpers: 'bundled', extensions: ['tsx'] }),
terser(),
],
plugins: [resolve(), commonjs(), typescript(), terser()],
external: ['react', 'react-dom'],
};
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"incremental": false,
"importHelpers": true,
"isolatedModules": true,
"jsx": "preserve",
"jsx": "react",
"lib": ["dom", "dom.iterable", "esnext"],
"moduleResolution": "node",
"outDir": "./dist",
Expand Down
Loading

0 comments on commit c62cfc9

Please sign in to comment.