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

Improve watch script #325

Merged
merged 2 commits into from
Oct 10, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
fix: streamline listeners
  • Loading branch information
zetlen committed Oct 10, 2018

Unverified

No user is associated with the committer email.
commit 98f2573efe1a3d0e7a93eef31fd55d432454b522
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -30,8 +30,7 @@
"watch:all": "node scripts/watch-all.js",
"watch:buildpack": "cd packages/pwa-buildpack && npm run -s watch; cd - >/dev/null",
"watch:peregrine": "cd packages/peregrine && npm run -s watch; cd - >/dev/null",
"watch:venia": "cd packages/venia-concept && npm run -s watch; cd - >/dev/null",
"watch:venia-dev-server": "cd packages/venia-concept && nodemon --watch ../pwa-buildpack/dist --watch webpack.config.js --delay 1 --ext js,json --exec npm run-script watch; cd - >/dev/null"
"watch:venia": "cd packages/venia-concept && npm run -s watch; cd - >/dev/null"
},
"devDependencies": {
"@magento/eslint-config": "^1.2.3",
@@ -111,7 +110,6 @@
"multispinner": "^0.2.1",
"nock": "^10.0.0",
"node-fetch": "^2.2.0",
"nodemon": "^1.18.4",
"npm-run-all": "^4.1.2",
"one-time": "^0.0.4",
"portscanner": "^2.2.0",
2 changes: 1 addition & 1 deletion packages/venia-concept/package.json
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
"homepage": "https://github.com/magento-research/pwa-studio/tree/master/packages/venia-concept#readme",
"scripts": {
"build": "webpack --color --env.phase production",
"clean": "rimraf web/js",
"clean": "rimraf dist",
"start": "node server.js",
"start:debug": "node --inspect-brk ./node_modules/.bin/webpack-dev-server --progress --color --env.phase development",
"validate-queries": "node ./validate-queries.js",
12 changes: 9 additions & 3 deletions packages/venia-concept/src/classify.js
Original file line number Diff line number Diff line change
@@ -2,8 +2,14 @@ import React from 'react';

const merge = (...args) => Object.assign({}, ...args);

const classify = classes => WrappedComponent => props => (
<WrappedComponent {...props} classes={merge(classes, props.classes)} />
);
const classify = classes => WrappedComponent => {
const Classified = props => (
<WrappedComponent {...props} classes={merge(classes, props.classes)} />
);
Classified.displayName = `Classified(${WrappedComponent.displayName ||
WrappedComponent.name ||
'Component'})`;
return Classified;
};

export default classify;
3 changes: 2 additions & 1 deletion scripts/watch-all.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require('events').EventEmitter.defaultMaxListeners = 100;

const execa = require('execa');
const path = require('path');
const Multispinner = require('multispinner');
@@ -70,7 +72,6 @@ const mustWatch = ['@magento/pwa-buildpack', '@magento/peregrine'];

const restartDevServerOnChange = [
'packages/pwa-buildpack/dist/**/*.js',
'packages/peregrine/dist/**/*.js',
'packages/upward-js/lib/**/*.js',
'packages/venia-concept/*.{js,json,yml}',
'packages/venia-concept/.babelrc',