With Angular CLI you can bootstrap a new project effortlessly. Let’s create a new Angular 6 application complemented with Bootstrap 4 and Sass preprocessor.
$ ng --version Angular CLI: 6.0.8 Node: 8.11.3 OS: linux x64 Angular: 6.1.1
scss
preprocessor. If you want to set a different preprocessor or alter the global configuration for all feature projects – read the How to change a CSS preprocessor in an Angular project post.Run the following command to generate a fresh project:
$ ng new awesome-project --style=scss
Go to the project main directory:
$ cd awesome-project
A git repository has been already initialized:
$ git status On branch master nothing to commit, working tree clean $ git log commit 2e6e36ec34282b83658d2e4e7a26a39e79f38791 (HEAD -> master) Author: little_pinecone Date: Thu Aug 30 10:57:23 2018 +0200 initial commit
npm
allows you to fix some known vulnerabilities found in the project dependencies, you can run the following command:
$ npm audit fix
This command automatically eliminates well-acknowledged javascript vulnerabilities by updating those faulty libraries versions that don’t introduce braking changes.
Remember to commit the adjustments made in the package.json
file:
$ git status modified: package-lock.json modified: package.json $ git add -A $ git commit -m "npm packages updated"
To add the latest version of the Bootstrap styles to the project, run the following command:
$ npm install bootstrap
Add the following path in the angular.json
file:
// angular.json … "styles": [ … "node_modules/bootstrap/scss/bootstrap.scss" ], …
Start the Angular server to make sure that the project was successfully created:
$ ng serve --open ** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Photo by Autri Taheri on StockSnap
Spring Security allows us to use role-based control to restrict access to API resources. However,…
A custom annotation in Spring Boot tests is an easy and flexible way to provide…
Delegating user management to Keycloak allows us to better focus on meeting the business needs…
Swagger offers various methods to authorize requests to our Keycloak secured API. I'll show you…
Configuring our Spring Boot API to use Keycloak as an authentication and authorization server can…
Keycloak provides simple integration with Spring applications. As a result, we can easily configure our…