refactor(rollup): use terser instead of uglify

This commit is contained in:
moklick
2019-10-08 20:31:12 +02:00
parent 9230858227
commit 956f4fb978
11 changed files with 1788 additions and 1767 deletions

View File

@@ -8,14 +8,5 @@
],
"@babel/preset-react"
],
"env": {
"test": {
"presets": [
[
"react-app"
]
]
}
},
"plugins": []
}

2
dist/ReactFlow.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -160,17 +160,30 @@
pointer-events: all;
}
.react-flow__controls-button {
background: #f8f8f8;
border: 1px solid #eee;
display: flex;
justify-content: center;
align-items: center;
width: 24px;
height: 24px;
cursor: pointer;
.react-flow__controls {
box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08);
}
.react-flow__controls-button {
background: #fefefe;
border-bottom: 1px solid #eee;
display: flex;
justify-content: center;
align-items: center;
width: 16px;
height: 16px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
padding: 5px;
}
.react-flow__controls-button img {
width: 100%;
}
.react-flow__controls-button:hover {
background: #eee;
}
background: #f4f4f4;
}

8
dist/ReactFlow.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/ReactFlow.min.js.map vendored Normal file

File diff suppressed because one or more lines are too long

3483
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,8 +2,8 @@
"name": "react-flow",
"version": "1.0.0",
"module": "dist/ReactFlow.esm.js",
"browser": "dist/ReactFlow.js",
"main": "dist/ReactFlow.js",
"browser": "dist/ReactFlow.min.js",
"main": "dist/ReactFlow.min.js",
"private": true,
"dependencies": {
"@welldone-software/why-did-you-render": "^3.3.7",
@@ -37,6 +37,7 @@
"rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-serve": "^1.0.1",
"rollup-plugin-svg": "^2.0.0",
"rollup-plugin-terser": "^5.1.2",
"rollup-plugin-uglify": "^6.0.3",
"rollup-plugin-visualizer": "^2.6.0",
"start-server-and-test": "^1.10.4",

View File

@@ -4,9 +4,8 @@ import babel from 'rollup-plugin-babel';
import postcss from 'rollup-plugin-postcss';
import bundleSize from 'rollup-plugin-bundle-size';
import visualizer from 'rollup-plugin-visualizer';
import { uglify } from 'rollup-plugin-uglify';
import svg from 'rollup-plugin-svg'
import { terser } from 'rollup-plugin-terser';
import svg from 'rollup-plugin-svg';
import pkg from './package.json';
@@ -45,6 +44,6 @@ export default [{
}),
svg(),
visualizer(),
isProd && uglify()
isProd && terser()
]}
];

View File

@@ -8,12 +8,10 @@ if (process.env.NODE_ENV !== 'production') {
}
import GraphView from '../GraphView';
import DefaultNode from '../../components/Nodes/DefaultNode';
import InputNode from '../../components/Nodes/InputNode';
import OutputNode from '../../components/Nodes/OutputNode';
import { createNodeTypes } from '../NodeRenderer/utils';
import BezierEdge from '../../components/Edges/BezierEdge';
import StraightEdge from '../../components/Edges/StraightEdge';
import StepEdge from '../../components/Edges/StepEdge';

View File

@@ -1,2 +1,2 @@
export { default as MiniMap } from './MiniMap';
export { default as Controls } from './Controls';
export { default as Controls } from './Controls';