<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>angular/cli | Bogdan's blog</title>
	<atom:link href="https://blog.bogdancarpean.com/tag/angular-cli/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.bogdancarpean.com</link>
	<description>Code and anything else.</description>
	<lastBuildDate>Fri, 24 Jan 2020 19:21:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>

<image>
	<url>https://blog.bogdancarpean.com/wp-content/uploads/2022/12/icons8-pencil-drawing-96.png</url>
	<title>angular/cli | Bogdan's blog</title>
	<link>https://blog.bogdancarpean.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>New ng lint syntax on Angular 6</title>
		<link>https://blog.bogdancarpean.com/new-ng-lint-syntax-on-angular-6/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-ng-lint-syntax-on-angular-6</link>
					<comments>https://blog.bogdancarpean.com/new-ng-lint-syntax-on-angular-6/#respond</comments>
		
		<dc:creator><![CDATA[Bogdan]]></dc:creator>
		<pubDate>Tue, 19 Jun 2018 22:50:36 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[Angular 2]]></category>
		<category><![CDATA[TypeScript]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angular/cli]]></category>
		<category><![CDATA[lint]]></category>
		<guid isPermaLink="false">http://blog.bogdancarpean.com/?p=251</guid>

					<description><![CDATA[<p>Let&#8217;s say you had a syntax like ng lint --format stylish on your package.json before Angular 6. Running this after you update to Angular 6 will result in the following error: Architect command with multiple targets cannot specify overrides. This error is not much of help when you know that before update the linting worked fine. For this [&#8230;]</p>
The post <a href="https://blog.bogdancarpean.com/new-ng-lint-syntax-on-angular-6/">New ng lint syntax on Angular 6</a> first appeared on <a href="https://blog.bogdancarpean.com">Bogdan's blog</a>.]]></description>
										<content:encoded><![CDATA[<div style="text-align: left;">Let&#8217;s say you had a syntax like <code>ng lint --format stylish</code> on your <code>package.json</code> before Angular 6.</div>
<p>Running this after you update to Angular 6 will result in the following error: <code>Architect command with multiple targets cannot specify overrides.</code> This error is not much of help when you know that before update the linting worked fine.</p>
<p>For this to work, we have to add the name of the application after the <code>ng lint</code> command: <code>ng lint your_app_name --format stylish</code></p>The post <a href="https://blog.bogdancarpean.com/new-ng-lint-syntax-on-angular-6/">New ng lint syntax on Angular 6</a> first appeared on <a href="https://blog.bogdancarpean.com">Bogdan's blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://blog.bogdancarpean.com/new-ng-lint-syntax-on-angular-6/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to run Angular tests on CI Docker Container with Chrome</title>
		<link>https://blog.bogdancarpean.com/how-to-run-angular-tests-on-ci-docker-container-with-chrome/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-run-angular-tests-on-ci-docker-container-with-chrome</link>
					<comments>https://blog.bogdancarpean.com/how-to-run-angular-tests-on-ci-docker-container-with-chrome/#respond</comments>
		
		<dc:creator><![CDATA[Bogdan]]></dc:creator>
		<pubDate>Sat, 06 Jan 2018 05:31:33 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angular tests]]></category>
		<category><![CDATA[angular/cli]]></category>
		<category><![CDATA[atlassian bitbucket pipelines]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[node]]></category>
		<guid isPermaLink="false">http://blog.bogdancarpean.com/?p=171</guid>

					<description><![CDATA[<p>In this article, we are going to learn how to run the tests of an Angular solution generated with @angular/cli into a Docker Container without changing any of the initial configuration generated by @angular/cli. This is very important in the context of Continuous Integration workflow when you want to run your tests as you commit [&#8230;]</p>
The post <a href="https://blog.bogdancarpean.com/how-to-run-angular-tests-on-ci-docker-container-with-chrome/">How to run Angular tests on CI Docker Container with Chrome</a> first appeared on <a href="https://blog.bogdancarpean.com">Bogdan's blog</a>.]]></description>
										<content:encoded><![CDATA[<div style="position: relative;">In this article, we are going to learn how to run the tests of an Angular solution generated with <a href="https://cli.angular.io/" target="_blank" rel="noopener noreferrer"><code>@angular/cli</code></a> into a Docker Container without changing any of the initial configuration generated by <a href="https://cli.angular.io/" target="_blank" rel="noopener noreferrer"><code>@angular/cli</code></a>. This is very important in the context of Continuous Integration workflow when you want to run your tests as you commit to the repo.</div>
<p>For this example I&#8217;m gonna use the <a href="https://bitbucket.org/product" target="_blank" rel="noopener noreferrer">Atlassian Bitbucket Pipelines</a> for continuous integration, but is not limited to it, you can use it in any other environment that is using a <a href="https://www.docker.com/" target="_blank" rel="noopener noreferrer">Docker Container</a>, like Bitbucket, to test and build your Angular app.</p>
<p>To be able to test the Angular solution generated with <a href="https://cli.angular.io/" target="_blank" rel="noopener noreferrer"><code>@angular/cli</code></a>, we need a <a href="https://www.docker.com/" target="_blank" rel="noopener noreferrer">Docker Container</a> with <a href="https://nodejs.org/en/" target="_blank" rel="noopener noreferrer">Node</a> to run <code>npm install</code> in order to install the dependencies and then we need an instance of <a href="https://www.google.com/chrome/browser/desktop/index.html" target="_blank" rel="noopener noreferrer"><code>chrome</code></a> to run the tests.</p>
<p>For this, we have two solutions. I prefer the first one in which we take the official Node Docker Container, for the time being, 6.9.4, we install the <code>chrome</code> browser, then run <code>npm install</code> to fetch the dependencies of the project, then finally run our tests.</p>
<p>For Atlassian Bitbucket Pipelines, we are going to use the following code in the commit <code>bitbucket-pipelines.yml</code> file:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="ini">image: node:6.9.4

pipelines:
  default:
    - step:
        caches:
          - node
        script:
          - apt-get update; apt-get install -y gettext-base;
          - echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' &gt; /etc/apt/sources.list.d/chrome.list
          - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
          - set -x &amp;&amp; apt-get update &amp;&amp; apt-get install -y xvfb google-chrome-stable
          - wget -q -O /usr/bin/xvfb-chrome https://bitbucket.org/atlassian/docker-node-chrome-firefox/raw/ff180e2f16ea8639d4ca4a3abb0017ee23c2836c/scripts/xvfb-chrome
          - ln -sf /usr/bin/xvfb-chrome /usr/bin/google-chrome
          - chmod 755 /usr/bin/google-chrome
          - npm install
          - ./node_modules/@angular/cli/bin/ng -v
          - ./node_modules/@angular/cli/bin/ng test --watch=false</pre>
<p>Please take into consideration that this is the code for a <code>debian linux</code> machine inside the Docker Container, so you have to adapt if you have a different machine.</p>
<p>I said that this solution is my preferred one because I want to test my app against the newest <code>chrome</code> version and I achieve this by installing the latest on each commit I make.</p>
<p>The downside of this solution is that it has to fetch all the updates for the <code>linux</code> machine and install <code>chrome</code> and it will take between 2 and 3 minutes to accomplish so this can become costly if you have a time limit on your Bitbucket account.</p>
<p>The second solution is to take a container from <a href="https://hub.docker.com/" target="_blank" rel="noopener noreferrer">Docker Container Hub</a> containing already Node and Chrome and to run the code starting from <code>npm install</code>. This way you cut in half the runtime, but you are going to test against the version of <code>chrome</code> installed into the Docker Container.</p>
<p>Have fun!</p>The post <a href="https://blog.bogdancarpean.com/how-to-run-angular-tests-on-ci-docker-container-with-chrome/">How to run Angular tests on CI Docker Container with Chrome</a> first appeared on <a href="https://blog.bogdancarpean.com">Bogdan's blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://blog.bogdancarpean.com/how-to-run-angular-tests-on-ci-docker-container-with-chrome/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Angular Service Worker landed on @angular.cli 1.6</title>
		<link>https://blog.bogdancarpean.com/angular-service-worker-landed-on-angular-cli-1-6/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=angular-service-worker-landed-on-angular-cli-1-6</link>
					<comments>https://blog.bogdancarpean.com/angular-service-worker-landed-on-angular-cli-1-6/#respond</comments>
		
		<dc:creator><![CDATA[Bogdan]]></dc:creator>
		<pubDate>Wed, 27 Dec 2017 18:15:08 +0000</pubDate>
				<category><![CDATA[Angular]]></category>
		<category><![CDATA[Angular 2]]></category>
		<category><![CDATA[TypeScript]]></category>
		<category><![CDATA[angular]]></category>
		<category><![CDATA[angular/cli]]></category>
		<category><![CDATA[progressive web apps]]></category>
		<category><![CDATA[service worker]]></category>
		<guid isPermaLink="false">http://blog.bogdancarpean.com/?p=124</guid>

					<description><![CDATA[<p>With Angular 5 version having implemented a new Service Worker customized for Angular apps and @angular/cli 1.6 building it into your Angular app, a further step towards Progressive Web Apps has been made. Why is this important? Progressive Web Apps (or PWA) are seen for many years now as the evolution of apps, bound to [&#8230;]</p>
The post <a href="https://blog.bogdancarpean.com/angular-service-worker-landed-on-angular-cli-1-6/">Angular Service Worker landed on @angular.cli 1.6</a> first appeared on <a href="https://blog.bogdancarpean.com">Bogdan's blog</a>.]]></description>
										<content:encoded><![CDATA[<div style="position: relative;">With Angular 5 version having implemented a new Service Worker customized for Angular apps and @angular/cli 1.6 building it into your Angular app, a further step towards Progressive Web Apps has been made.</div>
<p>Why is this important? Progressive Web Apps (or PWA) are seen for many years now as the evolution of apps, bound to replace the native mobile apps and offer the user a seamless experience (native-like) on mobile platforms. With the announcement of Service Worker API development on Webkit/Safari, the future of across the board support for Service Worker never looked better.</p>
<p><img decoding="async" loading="lazy" class="wp-image-165 size-full aligncenter" src="http://vps277782.vps.ovh.ca/wp-content/uploads/2017/12/CanIUse_ServiceWorker.png" alt="" width="750" height="394" srcset="https://blog.bogdancarpean.com/wp-content/uploads/2017/12/CanIUse_ServiceWorker.png 750w, https://blog.bogdancarpean.com/wp-content/uploads/2017/12/CanIUse_ServiceWorker-300x158.png 300w" sizes="(max-width: 750px) 100vw, 750px" /></p>
<p>What Service Worker is supposed to do? As a building part of a PWA, the Service Worker is a mandatory condition, because is the part of the application that is going to run in the background to handle application requests and caching, permitting the application to function while offline, thus having the native-like behavior.</p>
<p>As of @angular/cli version 1.6, you can create your Angular application containing the Angular Service Worker simply by passing the <code>--service-worker</code> flag when you create the app using the CLI:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="js">ng new yourappname --service-worker</pre>
<p>If you look now into the folder<code>/app</code>, you notice that a new file appeared,<code>ngsw-config</code> which is the configuration file for the added Angular Service Worker. Inside this file, you can decide which assets will be cached and in which manner.</p>
<p>Then, when you build your app, on the folder<code>/dist</code> you will see them <code>ngsw.json</code>and,<code>ngsw-worker.js</code> which is the actual Angular Service Worker.</p>
<p>More info on how to add the Angular Service Worker to your app <a href="https://medium.com/google-developer-experts/a-new-angular-service-worker-creating-automatic-progressive-web-apps-part-2-practice-3221471269a1" target="_blank" rel="noopener noreferrer">here</a>.</p>
<p>If you want to learn more about the Service Worker, <a href="https://developers.google.com/web/fundamentals/primers/service-workers/" target="_blank" rel="noopener noreferrer">here</a> is a good article.</p>The post <a href="https://blog.bogdancarpean.com/angular-service-worker-landed-on-angular-cli-1-6/">Angular Service Worker landed on @angular.cli 1.6</a> first appeared on <a href="https://blog.bogdancarpean.com">Bogdan's blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://blog.bogdancarpean.com/angular-service-worker-landed-on-angular-cli-1-6/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
