Angular-cli: ng e2e -op dist does not put files in dist folder

Created on 15 Feb 2017  Â·  5Comments  Â·  Source: angular/angular-cli

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 #01 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 distfolder (dist id default from angular-cli.json).

Most helpful comment

@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 :)

All 5 comments

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

@clydin Ok, but why does it then delete the distfolder 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

That behavior of ng serve (which also applies to e2e) was added recently: https://github.com/angular/angular-cli/pull/4293

@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 :)

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._

Was this page helpful?
0 / 5 - 0 ratings