Updated SPA procedure with the NPM extension for the VS Task Runner

Cesar De la Torre 2017-02-22 15:38:42 -08:00
parent f70f7828bb
commit 392702b841
3 changed files with 11 additions and 0 deletions

Binary file not shown.

@ -40,6 +40,17 @@ Then, run again the <b>npm run build:prod</b> command that should finish with no
<img src="img/spa/npm-run-build-prod-no-errors.png">
#### (Optional) Run NPM tasks from within Visual Studio 2017
As the chosen workload method when developing a client frontend app (JS frameworks, etc.), the developer has to be able to trigger the npm tasks when he wants.
Of course, he can always open a command propmt and run npm from the CLI as you just did in the steps above (which is most front-end devs do, in fact).
However, you can also run npm tasks inside Visual Studio if you install the following VS extension: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.NPMTaskRunner
This extension adds to the "Task Runner Explorer" the capabailities to run npm tasks (since, out of the box, only gulp/grunt tasks are supported by VS2017). After this extension is installed you can run npm tasks from inside VS2017 and also set build bindings if you wanted.
<img src="img/spa/task-runner-with-npm-extension.png">
This extension honors the VS External Web Tools configuration, and allows you to use bindings, so if you want to run npm tasks automatically on every VS build, you could do so. This is not set as default in the eShopOnContainers provided code as it would slow down each VS build with the npm build tasks.
### Build the Docker images and Deploy the containers
At this point, if you were originally following the eShopOnContainer setup for any environment and came to this page just to setup the SPA app, now go back to your original setup instructions page. Other than that, you can in any case choose between any of the following options to build and deploy the Docker containers:

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB