Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

dojo build -t -w doesn't work #259

Closed
denyskorolkov opened this issue Jan 1, 2018 · 7 comments
Closed

dojo build -t -w doesn't work #259

denyskorolkov opened this issue Jan 1, 2018 · 7 comments
Milestone

Comments

@denyskorolkov
Copy link

Bug

dojo build -t -w doesn't work. Separately both (dojo build -w & dojo build -t) work correctly.

Expected behavior:

Update files in the _build directory when they changed in src, tests directories.

Actual behavior:

The _build directory wasn't created in the root.

@agubler
Copy link
Member

agubler commented Jan 2, 2018

Hi @denyskorolkov, watch is not currently supported for building with tests. watch uses webpack dev server that builds bundles in memory and not physical files that are required to run the tests.

@denyskorolkov
Copy link
Author

Hi @agubler, I would like to use the next combination:

  • http://localhost:/node_modules/intern/?config=node_modules/@dojo/cli-test-intern/intern/intern.json&grep=
  • dojo build -w -t

This combination may help me to see the live test result of my code in a browser without the need to run dojo test every time. Maybe do you know a more appropriate solution?

@agubler
Copy link
Member

agubler commented Jan 3, 2018

@denyskorolkov at the moment using cli-build-webpack, dojo build -t will need to be re-run in order to see the results of code changes when running tests in the browser.

However we are working on a new package, cli-build-app, which will support watching and building tests and is scheduled to be released for the next beta (beta5).

@denyskorolkov
Copy link
Author

@agubler Thanks for the information. I will be tracking your progress with huge interest.

@dylans dylans added this to the beta.5 milestone Jan 4, 2018
@agubler
Copy link
Member

agubler commented Jan 11, 2018

Hey @denyskorolkov, we've released @dojo/cli-build-app@0.1.0 (compatible with @dojo/cli-test-intern@0.4.0) that will be part of the upcoming beta5 release. This will allow building the tests under watch so you will be able to run the tests in the browser without having to re-run the build every time!

The command to build the tests on a watch is:

dojo build --mode test --watch

@denyskorolkov
Copy link
Author

Thanks, @agubler. I've tried and it works but I have a question. Should I run web server separately or not? Now I run dojo build --mode test --watch and npx intern serveOnly

@denyskorolkov denyskorolkov reopened this Jan 12, 2018
@agubler
Copy link
Member

agubler commented Jan 17, 2018

Hey @denyskorolkov, at the moment you will need to run a web server separately (as you've been doing) from the root of the project as currently --serve serves the output/test.

We will open a new issue on cli-build-app to consider serving from the project root or disabling serve for the test mode entirely.

I hope that helps, thanks!

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

No branches or pull requests

3 participants