SlideShare a Scribd company logo
1 of 23
Download to read offline
Angular CLI with Bazel
UI/UX Designer / Frontend Developer
Muhammad Afif A. H
@afifalfiano8 @afifalfianoafifalfiano
Follow me on:
“BAZEL DOESN’T REPLACE
YOUR FAVORIT BUILD
TOOLS. IT GIVES THEM
SUPERPOWERS!”
WASSIM CHEGHAM
https://www.youtube.com/watch?v=iD2OdL3HKkE
Supercharge your builds with Bazel by Wassim Chegham
Re-build time is proportional to
what you changed
Incremental
01
We can cache build results
based on their inputs
Deterministic
02
Allows features like remote
execution, parallelization
Hermetic03
Why Bazel?
Googlers have beat on this thing
in every way
Industrial Grade
04
Builds Android, iOS, web, backends,
cloud services, and more
Universal
05
01
Who is using Bazel?
What is Bazel?
Bazel builds software from source code organized
in a directory called a workspace. Source files in
the workspace are organized in a nested hierarchy
of packages, where each package is a directory
that contains a set of related source files and one
BUILD file. The BUILD file specifies what software
outputs can be built from the source.
Core Concept (Workspace)
A workspace is a directory on
your filesystem that contains
the source files for the
software you want to build, as
well as symbolic links to
directories that contain the
build outputs
Core Concept (Repositories)
Code is organized in repositories.
The directory containing the
WORKSPACE file is the root of the
main repository, also called @.
Other, (external) repositories are
defined in the WORKSPACE file
using workspace rules.
Core Concept (Packages)
The primary unit of code organization in a repository is the package. A
package is a collection of related files and a specification of the
dependencies among them.
Core Concept (Rules)
A rule specifies the relationship
between inputs and outputs,
and the steps to build the
outputs. Rules can be of one of
many different kinds or classes,
which produce compiled
executables and libraries, test
executables and other
supported outputs as described
in the Build Encyclopedia.
Core Concept (BUILD files)
By definition, every package contains
a BUILD file, which is a short program.
BUILD files are evaluated using an
imperative language, Starlark. They
are interpreted as a sequential list of
statements.
Core Concept (Labels)
All targets belong to exactly one package. The name of a target is called
its label, and a typical label in canonical form looks like this:
How does Bazel work?
Loads the BUILD files relevant to the target.
Loads
Analyzes the inputs and their dependencies, applies the
specified build rules, and produces an action graph.
Analyzes
Executes the build actions on the inputs until the final
build outputs are produced.
Executes
01
02
03
01
02
03
Since all previous build work is cached, Bazel can identify and reuse
cached artifacts and only rebuild or retest what’s changed.
How to use Bazel?
01
02
03
01
02
03
Existing Project New Project
Make sure we have installed angular-cli and bazel globally
Customize Bazel
Bazel is zero configuration. We need to run this command to customize the
configuration bazel.
Customize Bazel
Before After
Bazel Query
Bazel’s query language to trace dependencies in your code.
Bazel Query
Prodserver Devserver
External Angular Module
To use an external module angular we need to edit angular-metadata.tsconfig.json and BUILD.bazel
angular-metadata.tsconfig.json BUILD.bazel
Third Party Library
To use a third party library we need to create require.config.js file and edit BUILD.bazel
require.config.js BUILD.bazel
DEMO
https://github.com/afifalfiano/load-test-bazel
Run the command:
npm install && npm run build && bazel run //src:devserver
References
• https://blog.ninja-squad.com/2019/05/14/build-your-angular-application-
with-bazel/
• http://slack.bazel.build/
• https://bazel.build/
• https://github.com/bazelbuild/rules_nodejs/tree/master/examples
• https://medium.com/tokopedia-engineering/how-tokopedia-achieved-100
0-faster-ios-build-time-7664b2d8ae5
• https://www.youtube.com/watch?v=iD2OdL3HKkE - Supercharge your
builds with Bazel by Wassim Chegham
THANK YOU

More Related Content

What's hot

Serverless Architecture Patterns - Manoj Ganapathi - Serverless Summit
Serverless Architecture Patterns - Manoj Ganapathi - Serverless SummitServerless Architecture Patterns - Manoj Ganapathi - Serverless Summit
Serverless Architecture Patterns - Manoj Ganapathi - Serverless SummitCodeOps Technologies LLP
 
Democamp Munich 2013: Are you still manually coding UIs?
Democamp Munich 2013: Are you still manually coding UIs?Democamp Munich 2013: Are you still manually coding UIs?
Democamp Munich 2013: Are you still manually coding UIs?Maximilian Kögel
 
Node in Production at Aviary
Node in Production at AviaryNode in Production at Aviary
Node in Production at AviaryAviary
 
SSO/Keycloak for Openshift
SSO/Keycloak for OpenshiftSSO/Keycloak for Openshift
SSO/Keycloak for OpenshiftGlenn West
 
Google Map Implementation with offline feature.
Google Map Implementation with offline feature.Google Map Implementation with offline feature.
Google Map Implementation with offline feature.Jayanta Sinhamahapatra
 
OpenNfv Talk On Kubernetes and Network Function Virtualization
OpenNfv Talk On Kubernetes and Network Function VirtualizationOpenNfv Talk On Kubernetes and Network Function Virtualization
OpenNfv Talk On Kubernetes and Network Function VirtualizationGlenn West
 
KKBOX WWDC17 Swift and Foundation - Liyao
KKBOX WWDC17 Swift and Foundation - LiyaoKKBOX WWDC17 Swift and Foundation - Liyao
KKBOX WWDC17 Swift and Foundation - LiyaoLiyao Chen
 
Serverless testing @ serverlessdays Hamburg
Serverless testing @ serverlessdays HamburgServerless testing @ serverlessdays Hamburg
Serverless testing @ serverlessdays HamburgAvishai Shafir
 
Introduction of tomcat
Introduction of tomcatIntroduction of tomcat
Introduction of tomcatKalkey
 
Branching Strategies: Feature Branches vs Branch by Abstraction
Branching Strategies: Feature Branches vs Branch by AbstractionBranching Strategies: Feature Branches vs Branch by Abstraction
Branching Strategies: Feature Branches vs Branch by AbstractionChris Birchall
 
Building a Scalable and Highly Available Web Service with AWS: A Live Demo
Building a Scalable and Highly Available Web Service with AWS: A Live DemoBuilding a Scalable and Highly Available Web Service with AWS: A Live Demo
Building a Scalable and Highly Available Web Service with AWS: A Live DemoDanilo Poccia
 
Aws Deployment Tools - Overview, Details, Implementation
Aws Deployment Tools - Overview, Details, ImplementationAws Deployment Tools - Overview, Details, Implementation
Aws Deployment Tools - Overview, Details, Implementationserkancapkan
 
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置Shengyou Fan
 
Build client-side web parts for Microsoft SharePoint
Build client-side web parts for Microsoft SharePointBuild client-side web parts for Microsoft SharePoint
Build client-side web parts for Microsoft SharePointChakkaradeep Chandran
 

What's hot (20)

Serverless Architecture Patterns - Manoj Ganapathi - Serverless Summit
Serverless Architecture Patterns - Manoj Ganapathi - Serverless SummitServerless Architecture Patterns - Manoj Ganapathi - Serverless Summit
Serverless Architecture Patterns - Manoj Ganapathi - Serverless Summit
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
 
Democamp Munich 2013: Are you still manually coding UIs?
Democamp Munich 2013: Are you still manually coding UIs?Democamp Munich 2013: Are you still manually coding UIs?
Democamp Munich 2013: Are you still manually coding UIs?
 
Advantages of angular 8
Advantages of angular 8Advantages of angular 8
Advantages of angular 8
 
Node in Production at Aviary
Node in Production at AviaryNode in Production at Aviary
Node in Production at Aviary
 
SSO/Keycloak for Openshift
SSO/Keycloak for OpenshiftSSO/Keycloak for Openshift
SSO/Keycloak for Openshift
 
Google Map Implementation with offline feature.
Google Map Implementation with offline feature.Google Map Implementation with offline feature.
Google Map Implementation with offline feature.
 
OpenNfv Talk On Kubernetes and Network Function Virtualization
OpenNfv Talk On Kubernetes and Network Function VirtualizationOpenNfv Talk On Kubernetes and Network Function Virtualization
OpenNfv Talk On Kubernetes and Network Function Virtualization
 
Angular js
Angular jsAngular js
Angular js
 
KKBOX WWDC17 Swift and Foundation - Liyao
KKBOX WWDC17 Swift and Foundation - LiyaoKKBOX WWDC17 Swift and Foundation - Liyao
KKBOX WWDC17 Swift and Foundation - Liyao
 
Serverless testing @ serverlessdays Hamburg
Serverless testing @ serverlessdays HamburgServerless testing @ serverlessdays Hamburg
Serverless testing @ serverlessdays Hamburg
 
Introduction of tomcat
Introduction of tomcatIntroduction of tomcat
Introduction of tomcat
 
React js
React jsReact js
React js
 
Branching Strategies: Feature Branches vs Branch by Abstraction
Branching Strategies: Feature Branches vs Branch by AbstractionBranching Strategies: Feature Branches vs Branch by Abstraction
Branching Strategies: Feature Branches vs Branch by Abstraction
 
Building a Scalable and Highly Available Web Service with AWS: A Live Demo
Building a Scalable and Highly Available Web Service with AWS: A Live DemoBuilding a Scalable and Highly Available Web Service with AWS: A Live Demo
Building a Scalable and Highly Available Web Service with AWS: A Live Demo
 
Aws Deployment Tools - Overview, Details, Implementation
Aws Deployment Tools - Overview, Details, ImplementationAws Deployment Tools - Overview, Details, Implementation
Aws Deployment Tools - Overview, Details, Implementation
 
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
[Kotlin Serverless 工作坊] 單元 1 - 開發環境建置
 
Build client-side web parts for Microsoft SharePoint
Build client-side web parts for Microsoft SharePointBuild client-side web parts for Microsoft SharePoint
Build client-side web parts for Microsoft SharePoint
 
Angular introduction students
Angular introduction studentsAngular introduction students
Angular introduction students
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 

Similar to Angular cli with bazel

GOOGLE_BAZEL.pptx
GOOGLE_BAZEL.pptxGOOGLE_BAZEL.pptx
GOOGLE_BAZEL.pptxDeeJeeV
 
All You Need to Know About Kustomize
All You Need to Know About KustomizeAll You Need to Know About Kustomize
All You Need to Know About KustomizeEverett Toews
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topicKalkey
 
Cloud native buildpacks_collabnix
Cloud native buildpacks_collabnixCloud native buildpacks_collabnix
Cloud native buildpacks_collabnixSuman Chakraborty
 
Cloud native buildpacks-cncf
Cloud native buildpacks-cncfCloud native buildpacks-cncf
Cloud native buildpacks-cncfSuman Chakraborty
 
Making cloud native deployments easy with Buildpack
Making cloud native deployments easy with BuildpackMaking cloud native deployments easy with Buildpack
Making cloud native deployments easy with BuildpackGDG Cloud Bengaluru
 
AWS CLOUDFORMATION
AWS CLOUDFORMATIONAWS CLOUDFORMATION
AWS CLOUDFORMATIONRiyaz-ul
 
Kotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptxKotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptxtakshilkunadia
 
Kotlin With JetPack Compose Presentation
Kotlin With JetPack Compose PresentationKotlin With JetPack Compose Presentation
Kotlin With JetPack Compose PresentationKnoldus Inc.
 
Introducing adf business components
Introducing adf business componentsIntroducing adf business components
Introducing adf business componentsPrabhat gangwar
 
CI/CD Development in Kubernetes - Skaffold
CI/CD Development in Kubernetes -  SkaffoldCI/CD Development in Kubernetes -  Skaffold
CI/CD Development in Kubernetes - SkaffoldSuman Chakraborty
 
How to develop reusable components with Babel and Rollup.js
How to develop reusable components with Babel and Rollup.jsHow to develop reusable components with Babel and Rollup.js
How to develop reusable components with Babel and Rollup.jsHugo Magalhães
 
Xcode Project Infrastructure
Xcode Project InfrastructureXcode Project Infrastructure
Xcode Project InfrastructureMake School
 
Building a Large Java Codebase with Bazel - Natan Silnitsky
Building a Large Java Codebase with Bazel - Natan Silnitsky Building a Large Java Codebase with Bazel - Natan Silnitsky
Building a Large Java Codebase with Bazel - Natan Silnitsky Wix Engineering
 
Flexible delivery options
Flexible delivery options Flexible delivery options
Flexible delivery options Micro Focus
 
Hitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as Code
Hitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as CodeHitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as Code
Hitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as CodeRobert van Mölken
 

Similar to Angular cli with bazel (20)

GOOGLE_BAZEL.pptx
GOOGLE_BAZEL.pptxGOOGLE_BAZEL.pptx
GOOGLE_BAZEL.pptx
 
All You Need to Know About Kustomize
All You Need to Know About KustomizeAll You Need to Know About Kustomize
All You Need to Know About Kustomize
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
Cloud native buildpacks_collabnix
Cloud native buildpacks_collabnixCloud native buildpacks_collabnix
Cloud native buildpacks_collabnix
 
Cloud native buildpacks-cncf
Cloud native buildpacks-cncfCloud native buildpacks-cncf
Cloud native buildpacks-cncf
 
Making cloud native deployments easy with Buildpack
Making cloud native deployments easy with BuildpackMaking cloud native deployments easy with Buildpack
Making cloud native deployments easy with Buildpack
 
AWS CLOUDFORMATION
AWS CLOUDFORMATIONAWS CLOUDFORMATION
AWS CLOUDFORMATION
 
Kotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptxKotlin Basics & Introduction to Jetpack Compose.pptx
Kotlin Basics & Introduction to Jetpack Compose.pptx
 
ABC: Angular, Bazel, CLI
ABC: Angular, Bazel, CLIABC: Angular, Bazel, CLI
ABC: Angular, Bazel, CLI
 
Kotlin With JetPack Compose Presentation
Kotlin With JetPack Compose PresentationKotlin With JetPack Compose Presentation
Kotlin With JetPack Compose Presentation
 
Introducing adf business components
Introducing adf business componentsIntroducing adf business components
Introducing adf business components
 
Eclipse Vs Netbeans
Eclipse Vs NetbeansEclipse Vs Netbeans
Eclipse Vs Netbeans
 
CI/CD Development in Kubernetes - Skaffold
CI/CD Development in Kubernetes -  SkaffoldCI/CD Development in Kubernetes -  Skaffold
CI/CD Development in Kubernetes - Skaffold
 
How to develop reusable components with Babel and Rollup.js
How to develop reusable components with Babel and Rollup.jsHow to develop reusable components with Babel and Rollup.js
How to develop reusable components with Babel and Rollup.js
 
Xcode Project Infrastructure
Xcode Project InfrastructureXcode Project Infrastructure
Xcode Project Infrastructure
 
Building a Large Java Codebase with Bazel - Natan Silnitsky
Building a Large Java Codebase with Bazel - Natan Silnitsky Building a Large Java Codebase with Bazel - Natan Silnitsky
Building a Large Java Codebase with Bazel - Natan Silnitsky
 
Cocoapods
CocoapodsCocoapods
Cocoapods
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Flexible delivery options
Flexible delivery options Flexible delivery options
Flexible delivery options
 
Hitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as Code
Hitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as CodeHitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as Code
Hitchhiker's guide to Cloud-Native Build Pipelines and Infrastructure as Code
 

Recently uploaded

Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
Revolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial IntelligenceRevolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial IntelligencePrecisely
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPTiSEO AI
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 

Recently uploaded (20)

Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Revolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial IntelligenceRevolutionizing SAP® Processes with Automation and Artificial Intelligence
Revolutionizing SAP® Processes with Automation and Artificial Intelligence
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 

Angular cli with bazel

  • 2. UI/UX Designer / Frontend Developer Muhammad Afif A. H @afifalfiano8 @afifalfianoafifalfiano Follow me on:
  • 3. “BAZEL DOESN’T REPLACE YOUR FAVORIT BUILD TOOLS. IT GIVES THEM SUPERPOWERS!” WASSIM CHEGHAM https://www.youtube.com/watch?v=iD2OdL3HKkE Supercharge your builds with Bazel by Wassim Chegham
  • 4. Re-build time is proportional to what you changed Incremental 01 We can cache build results based on their inputs Deterministic 02 Allows features like remote execution, parallelization Hermetic03 Why Bazel? Googlers have beat on this thing in every way Industrial Grade 04 Builds Android, iOS, web, backends, cloud services, and more Universal 05
  • 6. What is Bazel? Bazel builds software from source code organized in a directory called a workspace. Source files in the workspace are organized in a nested hierarchy of packages, where each package is a directory that contains a set of related source files and one BUILD file. The BUILD file specifies what software outputs can be built from the source.
  • 7. Core Concept (Workspace) A workspace is a directory on your filesystem that contains the source files for the software you want to build, as well as symbolic links to directories that contain the build outputs
  • 8. Core Concept (Repositories) Code is organized in repositories. The directory containing the WORKSPACE file is the root of the main repository, also called @. Other, (external) repositories are defined in the WORKSPACE file using workspace rules.
  • 9. Core Concept (Packages) The primary unit of code organization in a repository is the package. A package is a collection of related files and a specification of the dependencies among them.
  • 10. Core Concept (Rules) A rule specifies the relationship between inputs and outputs, and the steps to build the outputs. Rules can be of one of many different kinds or classes, which produce compiled executables and libraries, test executables and other supported outputs as described in the Build Encyclopedia.
  • 11. Core Concept (BUILD files) By definition, every package contains a BUILD file, which is a short program. BUILD files are evaluated using an imperative language, Starlark. They are interpreted as a sequential list of statements.
  • 12. Core Concept (Labels) All targets belong to exactly one package. The name of a target is called its label, and a typical label in canonical form looks like this:
  • 13. How does Bazel work? Loads the BUILD files relevant to the target. Loads Analyzes the inputs and their dependencies, applies the specified build rules, and produces an action graph. Analyzes Executes the build actions on the inputs until the final build outputs are produced. Executes 01 02 03 01 02 03 Since all previous build work is cached, Bazel can identify and reuse cached artifacts and only rebuild or retest what’s changed.
  • 14. How to use Bazel? 01 02 03 01 02 03 Existing Project New Project Make sure we have installed angular-cli and bazel globally
  • 15. Customize Bazel Bazel is zero configuration. We need to run this command to customize the configuration bazel.
  • 17. Bazel Query Bazel’s query language to trace dependencies in your code.
  • 19. External Angular Module To use an external module angular we need to edit angular-metadata.tsconfig.json and BUILD.bazel angular-metadata.tsconfig.json BUILD.bazel
  • 20. Third Party Library To use a third party library we need to create require.config.js file and edit BUILD.bazel require.config.js BUILD.bazel
  • 21. DEMO https://github.com/afifalfiano/load-test-bazel Run the command: npm install && npm run build && bazel run //src:devserver
  • 22. References • https://blog.ninja-squad.com/2019/05/14/build-your-angular-application- with-bazel/ • http://slack.bazel.build/ • https://bazel.build/ • https://github.com/bazelbuild/rules_nodejs/tree/master/examples • https://medium.com/tokopedia-engineering/how-tokopedia-achieved-100 0-faster-ios-build-time-7664b2d8ae5 • https://www.youtube.com/watch?v=iD2OdL3HKkE - Supercharge your builds with Bazel by Wassim Chegham