-
Notifications
You must be signed in to change notification settings - Fork 9
[CORE-1439] Stream Client code is not transpiled #15
Conversation
hpihkala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs some manual testing, especially from external projects that use this via npm (in node or webpack). I'll try it out and report back.
| return fetch('http://localhost:8081') | ||
| .catch((e) => { | ||
| if (e.errno === 'ENOTFOUND') { | ||
| throw new Error('Integration testing requires the api and http-api ("entire stack") to be run in the background. ' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Use correct project names: "api and http-api" => "engine-and-editor and data-api"
- Could also check that http://localhost:8890 (data-api) responds
package.json
Outdated
| "url": "git://github.com/streamr-dev/streamr-client.git" | ||
| }, | ||
| "main": "src/index.js", | ||
| "main": "dist/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filename is probably not index.js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not. Good catch!
| "scripts": { | ||
| "build": "webpack --env dev && webpack --env prod && npm run test", | ||
| "dev": "webpack --progress --colors --watch --env dev", | ||
| "build": "NODE_ENV=production webpack", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, npm build enforced running tests. I think it's a pretty justifiable idea. For reference, many other build systems, for example gradle and maven always run tests after building too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously tests were run but not enforced (code was built no matter what the result of the tests were). It was a bug though, and not relevant now.
I personally don't think that failing tests should prevent building, but publishing. I'd rather put the running of tests into eg. pre-commit hook (now when we don't have a CI yet).
If you want to put it back to this command though, we can ofc do it before setting up a proper CI
|
@hpihkala pls test again now. Fixed the examples (and tidied them up a bit) |
|
I noticed that the file size of the Also did some minor cleanup. All the examples are working now. LGTM. To be published as |
timoxley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
@hpihkala I'll make a pre-release first ( |
No description provided.