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] - Improve display errors #22

Merged
merged 14 commits into from Jun 15, 2017
Merged

[WIP] - Improve display errors #22

merged 14 commits into from Jun 15, 2017

Conversation

tzilist
Copy link
Contributor

@tzilist tzilist commented Jun 11, 2017

This PR is very much a WIP. Currently, we need to watch the error outputs from webpack and bsb while developing. This PR attempts to work on issue #3 .

Currently, we spawn a process for bsb -make-work -w, webpack-dev-server -w and berror. Currently, berror seems like a pain to use so this may need to change. We then keep track of the status of webpack and bsb compilation errors/successes and log those to the console.

Each time a file is saved, the terminal is updated in real time to reflect the current status of each compiler.

Here are a few screenshots of what this currently looks like in the terminal.

screenshot from 2017-06-10 18-34-18
screenshot from 2017-06-10 18-34-43
screenshot from 2017-06-10 18-35-08
screenshot from 2017-06-10 18-35-29

Keep in mind this relies heavily on berror currently which very much is still in beta.

* 'master' of github.com:knowbody/crra:
  fix some bugs (knowbody#6)
* 'master' of github.com:knowbody/crra: (25 commits)
  Correct build-source path (knowbody#18)
  v0.1.10
  make changes to cli (knowbody#17)
  Update README.md
  v0.1.9
  add chmod to build script (knowbody#14)
  v0.1.8
  update permissions (knowbody#12)
  v0.1.7
  Set file permissions on copy, and add README.md to template (knowbody#11)
  v0.1.6
  add back webpack config
  v0.1.5
  chenage permissions to copy.js
  v0.1.4
  add scripts/copy.js back
  v0.1.3
  fix bin in package.json
  v0.1.2
  fix repo url
  ...
@knowbody
Copy link
Owner

This is great! I'm wondering if we could also be showing these errors in the browser, while in DEV mode?

@tzilist
Copy link
Contributor Author

tzilist commented Jun 13, 2017

We certainly could. webpack-dev-server does allow for an overlay and I can work on that this week. I figured this would be nice so you don't have to run everything in 2 different terminal sessions.

@tzilist
Copy link
Contributor Author

tzilist commented Jun 14, 2017

Added a few more things:

  1. Status now can be Error, Compiling, or Completed under BSB and Webpack statuses in the CLI.

If there is an error, it will put it under it's respective compiler.

  1. Webpack errors now show as an overlay in the browser.

If anyone feels like it, test it out and let's see how people feel about it!

@knowbody
Copy link
Owner

@tzilist this is amazing!

the repo changed a bit since last time, do you mind syncing with master please

@tzilist
Copy link
Contributor Author

tzilist commented Jun 15, 2017

Ok, updated!

Process now exits on webpack errors and decides whether to use yarn or npm to execute the start up processes.

@knowbody
Copy link
Owner

Again this is great! Thank you for the PR!

@knowbody knowbody merged commit f13217b into knowbody:master Jun 15, 2017
@knowbody knowbody mentioned this pull request Jun 15, 2017
@knowbody
Copy link
Owner

@tzilist I released the version (v0.2.1) with the error display, but I'm not sure it works properly. It doesn't seem to update JS files, and I can't see any errors being displayed in the browser. Do you mind having a look into it please?

@tzilist
Copy link
Contributor Author

tzilist commented Jun 15, 2017

On it!

@tzilist
Copy link
Contributor Author

tzilist commented Jun 15, 2017

@knowbody So, I just tested this out on a different machine and it seems to be working properly. Can you maybe upload your project so I can take a look? Also, we should probably make sure the users have berror installed as this heavily relies on it. Maybe we can add a link to install reason-cli to the package.json?

@knowbody
Copy link
Owner

knowbody commented Jun 15, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants