Posts

Showing posts with the label ng2

Running Tests in Docker for Front-end Developers (ng2+)

Image
Unit tests (karma/jasmine) & End-to-end tests (protractor) If you are comfortable with Docker and Angular 2, all you need is the Dockerfile. If you are new to testing in Docker, this short article will bring you up to speed. If you need more help getting up to speed with Docker, begin with my previous article: Docker for Angular 2 devs . Installation  In order to develop Angular 2+ in a container, you need to install Docker on a computer or VM. Docker takes a bit of memory and can take a lot of space so the biggest box you can give it is best. Once Docker is installed, start is up. Make sure all your docker commands are run from the folder that contains the Dockerfile. Dockerfile  Docker works by reading the description of a Dockerfile (or several in conjunction), to build out an image. Once the image is running, it is called a container. This particular Dockerfile is based on a Docker image that already has headless chrome, markadams/chromium-xvfb-js:7. There are s...

Docker for Angular 2 devs

Image
Docker is a Virtual Environment Docker containers are great for adding new developers to existing projects, or for learning new technologies without polluting your existing developer machine/host. Docker allows you to put a fence around the environment while still using it. Why Docker for Angular 2? Docker is an easy way to get up and going on a new stack, environment, tool, or operating system without having to learn how to install and configure the new stack. A collection of docker images are available from Docker Hub ranging from simple to incredibly complex -- saving you the time and energy. Angular 2 examples frequently include a Dockerfile in the repository which makes getting the example up and running much quicker -- if you don't have to focus on package installation and configuration. The base Angular 2 development stack uses Node, TypeScript, Typings, and a build system (such as SystemJs or Webpack ). Instead of learning each stack element before/while learning...