Skip to content

Commit

Permalink
refactor(rollup): create new css file on build
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Oct 7, 2019
1 parent c6b96e9 commit 859ac67
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 17 deletions.
79 changes: 69 additions & 10 deletions dist/ReactFlow.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,34 @@

.react-flow__edge {
fill: none;
stroke: #333;
stroke: #bbb;
stroke-width: 2;
pointer-events: all;
}

.react-flow__edge.selected {
stroke: #ff5050;
stroke: #555;
}

.react-flow__edge.animated {
stroke-dasharray: 5;
-webkit-animation: dashdraw 0.5s linear infinite;
animation: dashdraw 0.5s linear infinite;
}

.react-flow__edge.connection {
stroke: '#ddd';
pointer-events: none;
}

@-webkit-keyframes dashdraw {
from {stroke-dashoffset: 10}
}

@keyframes dashdraw {
from {stroke-dashoffset: 10}
}

.react-flow__nodes {
width: 100%;
height: 100%;
Expand Down Expand Up @@ -86,19 +105,43 @@
}

.react-flow__node.selected > * {
box-shadow: 0 0 0 2px #000;
box-shadow: 0 0 0 2px #555;
}

.react-flow__handle {
position: absolute;
width: 12px;
height: 12px;
transform: translate(-50%, -50%);
background: #222;
left: 50%;
border-radius: 50%;
width: 10px;
height: 8px;
background: rgba(255, 255, 255, 0.4);
cursor: crosshair;
}

.react-flow__handle.bottom {
top: auto;
left: 50%;
bottom: 0;
transform: translate(-50%, 0);
}

.react-flow__handle.top {
left: 50%;
top: 0;
transform: translate(-50%, 0);
}

.react-flow__handle.left {
top: 50%;
left: 0;
transform: translate(0, -50%);

}

.react-flow__handle.right {
right: 0;
top: 50%;
transform: translate(0, -50%);
}

.react-flow__nodesselection {
z-index: 3;
position: absolute;
Expand All @@ -114,4 +157,20 @@
position: absolute;
background: rgba(0, 89, 220, 0.08);
border: 1px dotted rgba(0, 89, 220, 0.8);
}
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-button:hover {
background: #eee;
}
4 changes: 2 additions & 2 deletions dist/ReactGraph.js → dist/ReactFlow.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/ReactFlow.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/ReactGraph.js.map

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "react-flow",
"version": "1.0.0",
"module": "dist/ReactGraph.esm.js",
"browser": "dist/ReactGraph.js",
"main": "dist/ReactGraph.js",
"module": "dist/ReactFlow.esm.js",
"browser": "dist/ReactFlow.js",
"main": "dist/ReactFlow.js",
"private": true,
"dependencies": {
"@welldone-software/why-did-you-render": "^3.3.6",
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export default [{
},
plugins: [
bundleSize(),
postcss(),
postcss({
extract: isProd
}),
resolve(),
babel({
exclude: 'node_modules/**'
Expand Down

0 comments on commit 859ac67

Please sign in to comment.