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

[WIP] Using yarn instead of npm install in client Dockerfile #2088

Closed
wants to merge 7 commits into from
Closed
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
5 changes: 3 additions & 2 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM node:6.9.0
WORKDIR /home/weave
COPY package.json /home/weave/
COPY package.json yarn.lock /home/weave/
ENV NPM_CONFIG_LOGLEVEL=warn NPM_CONFIG_PROGRESS=false
RUN npm install
RUN curl -o- -L https://yarnpkg.com/install.sh | bash
RUN $HOME/.yarn/bin/yarn install --pure-lockfile
COPY webpack.local.config.js webpack.production.config.js server.js .babelrc .eslintrc .eslintignore /home/weave/
9 changes: 3 additions & 6 deletions client/app/scripts/charts/nodes-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React from 'react';
import { connect } from 'react-redux';
import { assign, pick, includes } from 'lodash';
import { Map as makeMap, fromJS } from 'immutable';
import timely from 'timely';

import { scaleThreshold, scaleLinear } from 'd3-scale';
import { event as d3Event, select } from 'd3-selection';
Expand Down Expand Up @@ -86,7 +85,6 @@ function getNodeScale(nodesCount, width, height) {
return scaleLinear().range([0, normalizedNodeSize]);
}


function updateLayout(width, height, nodes, baseOptions) {
const nodeScale = getNodeScale(nodes.size, width, height);
const edges = initEdges(nodes);
Expand All @@ -95,10 +93,9 @@ function updateLayout(width, height, nodes, baseOptions) {
scale: nodeScale,
});

const timedLayouter = timely(doLayout);
const graph = timedLayouter(nodes, edges, options);

log(`graph layout took ${timedLayouter.time}ms`);
const timestampBefore = Date.now();
const graph = doLayout(nodes, edges, options);
log(`graph layout took ${Date.now() - timestampBefore}ms`);

const layoutNodes = graph.nodes.map(node => makeMap({
x: node.get('x'),
Expand Down
1 change: 0 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"redux-thunk": "2.1.0",
"reqwest": "2.0.5",
"reselect": "2.5.4",
"timely": "0.1.0",
"whatwg-fetch": "2.0.1",
"xterm": "2.1.0"
},
Expand Down
Loading