How to use Angular CLI without global installation
I'm JS developer with 13 years of professional experience. I'm always happy to teach my craft.
Search for a command to run...
I'm JS developer with 13 years of professional experience. I'm always happy to teach my craft.
No comments yet. Be the first to comment.
I’ve been working in programming for the last 16 years. Let’s see what changes I see in our industry that are enabled by generative AI. Rapid prototyping The last few months, I’ve been working on a set of WordPress plugins, related to event organizat...
Writing unit tests takes time and effort. Nonetheless, many teams insist on writing them anyway—that’s because of the benefits they bring to a project. Those benefits are mainly the following: fast feedback—unit tests speed up each iteration of twea...

Pure functions are the perfect case for unit testing. For a given input, we always expect the same output—there is no internal state involved. Let’s take a look at a few examples and some simple tests that check if the methods work as expected. Jasmi...

Let’s say you have a job interview in a few days. How should you prepare for it so that you can make an informed decision about joining the company, as well as make sure that your interests are taken care of? Prepare your questions An interview is a ...

Creating example projects is a common way of showing your skills to potential employers. Let’s take a look at what’s important to keep in mind when building personal projects with an eye toward impressing prospective employers. Simplicity Building ap...

I'm a developer using mostly angular.js. My angular2+ experience is mostly some studying or courses from time to time. Therefore - I'm not using angular-cli on a daily basis, and I seems to upgrade node & npm more often I generate a new angular2+ project.
The official doc, tells me to do as follow:
$ npm install -g @angular/cli
$ ng new my-project
I'm a bit bothered by this, because:
Besides, I really like the light-weight approach frameworks like Next.js or NuxtJS are allowing you to just start playing with their code generator.
Luckily, there is this alternative way of generating angular project:
$ npx -p @angular/cli ng new my-project
it does the job:

Even though angular documentation seems to assume you have no reason of trying out their framework, unless you it's your job and you need all the tooling all the time (maybe they are right about it); here we have an easier way of running their generator command, without turning our environment into angular-shop.