Skip to content

ng e2e -op dist does not put files in dist folder #4722

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

Closed
IngvarKofoed opened this issue Feb 15, 2017 · 5 comments
Closed

ng e2e -op dist does not put files in dist folder #4722

IngvarKofoed opened this issue Feb 15, 2017 · 5 comments

Comments

@IngvarKofoed
Copy link

IngvarKofoed commented Feb 15, 2017

OS?

Windows 10

Versions.

$ ng version
@angular/cli: 1.0.0-beta.31
node: 6.9.1
os: win32 x64
@angular/common: 2.4.6
@angular/compiler: 2.4.6
@angular/compiler-cli: 2.4.6
@angular/core: 2.4.6
@angular/forms: 2.4.6
@angular/http: 2.4.6
@angular/material: 2.0.0-beta.1
@angular/platform-browser: 2.4.6
@angular/platform-browser-dynamic: 2.4.6
@angular/router: 3.4.6
@angular/cli: 1.0.0-beta.31

Repro steps.

ng init
ng e2e -op dist

The log given by the failure.

$ ng e2e -op dist
** NG Live Development Server is running on http://localhost:4200. **
Hash: 9ca1e1bce5238dcef434
Time: 11294ms
chunk {0} polyfills.bundle.js, polyfills.bundle.map (polyfills) 153 kB {4} [initial] [rendered]
chunk {1} main.bundle.js, main.bundle.map (main) 3.97 kB {3} [initial] [rendered]
chunk {2} styles.bundle.js, styles.bundle.map (styles) 10 kB {4} [initial] [rendered]
chunk {3} vendor.bundle.js, vendor.bundle.map (vendor) 2.62 MB [initial] [rendered]
chunk {4} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]
webpack: Compiled successfully.
[20:44:25] I/file_manager - creating folder C:\Temp\mytest01\node_modules\protractor\node_modules\webdriver-manager\selenium
[20:44:27] I/downloader - curl -o C:\Temp\mytest01\node_modules\protractor\node_modules\webdriver-manager\selenium/chromedriver_2.27.zip https://chromedriver.storage.googleapis.com/2.27/chromedriver_win32.zip
[20:44:35] I/update - chromedriver: unzipping chromedriver_2.27.zip
[20:44:35] I/launcher - Running 1 instances of WebDriver
[20:44:35] I/direct - Using ChromeDriver directly...
Spec started

mytest01 App
√ should display message saying app works

Executed 1 of 1 spec SUCCESS in 1 sec.
[20:44:41] I/launcher - 0 instance(s) of WebDriver still running
[20:44:41] I/launcher - chrome #1 passed

Mention any other details that might be useful.

Like ng build -op dist, I would expect the ng e2e to put files in given folder. Which is also mentioned in the ng help

Thanks for awesome product! :)

Edit
It seems that ng e2e actually delete the dist folder (dist id default from angular-cli.json).

@clydin
Copy link
Member

clydin commented Feb 16, 2017

ng e2e leverages the ng serve command functionality which builds and serves the app from memory.

@IngvarKofoed
Copy link
Author

@clydin Ok, but why does it then delete the dist folder when starting?
Simple repro:

ng init
ng build 
// At this point at dist folder exist
ng e2e
// At this point the dist folder is gone

@clydin
Copy link
Member

clydin commented Feb 16, 2017

That behavior of ng serve (which also applies to e2e) was added recently: #4293

@IngvarKofoed
Copy link
Author

@clydin I see, so it is by design :) Thanks! :)

From a build server point of view, it would be nice if I could do one build only, run e2e and have the dist folder. Currently we have to run e2e before build because of the deletion of the folder and we have to build the app twice because of that :)

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
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

2 participants