SlideShare ist ein Scribd-Unternehmen logo
1 von 23
ngBoilerplate & 
generator-angular 
JS HCM Meetup – presented by Vincent De Smet
Why? 
• Yeoman - Stamp out a skeleton for your app quickly 
• Try: http://yeoman.io/codelab.html 
- very good intro! 
Uses generator-angular
Why ngBoilerplate? 
generator-angular 
• Package by layer 
• How to reuse? 
• How to debug? 
• Extensive sub-generators 
• Configuration options 
ngBoilerplate 
• Package by module 
• Lacks sub-generators 
• Lacks configuration options
Yeoman 
• Yo 
• Grunt / Gulp 
• Bower 
Get started: Install the ngBoilerplate generator globally: 
Using generator-ngbp.. Last updated on Aug, 28
Run generator of your choice
Use Bower package management 
• Uninstall what your project does not allow: 
• Install what your project requires: 
*i.e.: Foundation5+libsass instead of bootstrap+less 
**get sass as developer dependency only!
Manage dev dependencies with npm 
• Add grunt tasks with npm 
**grunt-sass is a SASS compiler using libsass instead of compass (ruby gem)
Customize your task runner (Grunt) 
• For example: to add sass compilation: 
1. Load the grunt-sass tasks: 
2. Configure the grunt tasks initConfig 
ngBoilerplate splits 
1. File Config 
(meta data for task config) 
2. Task Config 
& merges using lodash 
3. Register Alias Task, Multi Task for task running goodness - or create your own custom task
Customize your task runner (Grunt) - 2 
• In File config 
add sass info 
• In Task config 
configure grunt-sass task, 
multiple Task targets possible 
Templates are expanded recursively 
http://gruntjs.com/configuring-tasks#templates
Customize your task runner (Grunt) - 3 
• A task config can have multiple targets, 
if no target specified on run, all targets run 
• A task exposes default options for configuration. 
Options can be configured at different target level 
• Most grunt tasks are file operations (source > destination), 
declaration formats: 
1. Compact Format 
2. Files Object Format 
3. Files Array Format 
4. Older formats (won’t go into this)
Grunt File operations: Compact Format 
• ngBoilerplate example: 
Example: 
This concat task – build_css target 
1 source property ‘scr’ 
1 destination property ‘dest’ 
This format can only have 1 source-destination pair.
Grunt File operations: Files Object Format 
• ngBoilerplate example: 
Example: 
This sass task – dist target 
The property name ‘css/app.css’ is the destination 
The property value ‘scss/app.scss’ is the source 
This format can have multiple source – destination pairs
Grunt File operations: Files Array Notation 
• ngBoilerplate example: 
Example: 
This copy task – build_app_assets target 
Array of (src – dest) pairs +properties 
This format can have multiple source – destination pairs 
This format can also have additional properties per mapping
Grunt file: globbing patterns / +properties 
• http://gruntjs.com/configuring-tasks#globbing-patterns 
• http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
Registering Tasks 
• Alias Task 
• Multi Task 
Runs a plugin task taking into account the target, looks for configuration in 
config object. 
• Basic/Custom Task 
Example:
generator-ngbp – interesting bits: 
karmaconfig MultiTask : 
automatically updates the karma config file with all dependencies required to run tests: 
this.fileSrc http://gruntjs.com/api/inside-tasks#this.filessrc will contain all src files specified in the config object 
properties for the karmaconfig multi-task 
Grunt.file.copy http://gruntjs.com/api/grunt.file#grunt.file.copy with a processFunction to render the 
karma-unit.tpl.js template (expanding all vendor_files.js specified in the grunt config)
generator-ngbp – interesting bits: 
• Bower installed dependencies thus need to be added manually to:
Foundation5 / libsass tricky bits 
• Where to get Foundation5 SASS files? 
Get sass as developer dependency only! 
• Copy missing scss files from foundation libsass repo
Foundation5 / libsass tricky bits 
• _settings.scss partial still missing? 
• Get it from Foundation5 / Compass ruby gem generated directory.. 
• Update imports 
• Update gruntfile for Foundation5 sass files and replace recess task by 
sass task in: 
• concat:build_css 
• Index:build & index:compile 
• delta:sass 
• build & compile alias tasks
Grunt tricks 
• Could automatically load grunt tasks: 
https://github.com/sindresorhus/load-grunt-tasks 
• Better to use 
https://github.com/shootaroo/jit-grunt for Just In Time loading of grunt 
tasks 
• Use https://github.com/sindresorhus/time-grunt to see the benefits 
• https://github.com/tschaub/grunt-newer to run grunt with newer files only 
• https://github.com/sindresorhus/grunt-concurrent to run tasks 
concurrently 
• Split grunt configuration files http://creynders.github.io/load-grunt-configs 
• Have fun with github pages, https://github.com/tschaub/grunt-gh-pages
What’s next? 
• Learn Gulp! 
http://gulpjs.com/ 
Grunt is old… Gulp is all the rage now. 
• Write your own Generator… 
http://yeoman.io/authoring/
Generator explosion! 
• http://www.dancancro.com/comparison-of-angularjs-application-starters/
About me 
Author: Vincent De Smet 
this presentation source code: 
https://github.com/so0k/ngbp-foundation-libsass 
• Presentation prepared for Javascript Ho Chi Minh City Meetup Group 
You can find us at: 
• http://www.meetup.com/JavaScript-Ho-Chi-Minh-City/ 
• https://www.facebook.com/JavaScriptHCMC 
• https://plus.google.com/u/0/communities/116105314977285194967 
• http://www.slideshare.net/JavascriptMeetup

Weitere ähnliche Inhalte

Was ist angesagt?

Built in ci-cd with kubernetes, jenkins and helm
Built in ci-cd with kubernetes, jenkins and helmBuilt in ci-cd with kubernetes, jenkins and helm
Built in ci-cd with kubernetes, jenkins and helmPau López
 
Docker multi-stage build
Docker multi-stage buildDocker multi-stage build
Docker multi-stage buildAlexei Ledenev
 
Running Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeRunning Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeDanielle Madeley
 
Webinar: Creating an Effective Docker Build Pipeline for Java Apps
Webinar: Creating an Effective Docker Build Pipeline for Java AppsWebinar: Creating an Effective Docker Build Pipeline for Java Apps
Webinar: Creating an Effective Docker Build Pipeline for Java AppsCodefresh
 
Webinar: Using Docker Multi-stage Build to Create Advanced Pipelines
Webinar: Using Docker Multi-stage Build to Create Advanced PipelinesWebinar: Using Docker Multi-stage Build to Create Advanced Pipelines
Webinar: Using Docker Multi-stage Build to Create Advanced PipelinesCodefresh
 
Deployment Automation with Docker
Deployment Automation with DockerDeployment Automation with Docker
Deployment Automation with DockerEgor Pushkin
 
Auto-scaled Concourse CI on AWS w/o BOSH
Auto-scaled Concourse CI on AWS w/o BOSHAuto-scaled Concourse CI on AWS w/o BOSH
Auto-scaled Concourse CI on AWS w/o BOSH佑介 九岡
 
Continuous Deployment with Jenkins on Kubernetes
Continuous Deployment with Jenkins on KubernetesContinuous Deployment with Jenkins on Kubernetes
Continuous Deployment with Jenkins on KubernetesMatt Baldwin
 
Testing strategies for Docker containers
Testing strategies for Docker containersTesting strategies for Docker containers
Testing strategies for Docker containersAlexei Ledenev
 
Gitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a proGitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a prosparkfabrik
 
이미지 기반의 배포 패러다임 Immutable infrastructure
이미지 기반의 배포 패러다임 Immutable infrastructure이미지 기반의 배포 패러다임 Immutable infrastructure
이미지 기반의 배포 패러다임 Immutable infrastructureDaegwon Kim
 
GDG Lima - Docker Compose
GDG Lima - Docker ComposeGDG Lima - Docker Compose
GDG Lima - Docker ComposeMario IC
 
Webinar: Development Swarm Cluster with Docker Compose V3
Webinar: Development Swarm Cluster with Docker Compose V3Webinar: Development Swarm Cluster with Docker Compose V3
Webinar: Development Swarm Cluster with Docker Compose V3Codefresh
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerKuan Yen Heng
 
Ruby microservices with Docker - Sergii Koba
Ruby microservices with Docker -  Sergii KobaRuby microservices with Docker -  Sergii Koba
Ruby microservices with Docker - Sergii KobaRuby Meditation
 
TIAD 2016 : Migrating 100% of your production services to containers
TIAD 2016 : Migrating 100% of your production services to containersTIAD 2016 : Migrating 100% of your production services to containers
TIAD 2016 : Migrating 100% of your production services to containersThe Incredible Automation Day
 
Development Swarm Cluster
Development Swarm ClusterDevelopment Swarm Cluster
Development Swarm ClusterAlexei Ledenev
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERIndrajit Poddar
 
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)Diacode
 

Was ist angesagt? (20)

Built in ci-cd with kubernetes, jenkins and helm
Built in ci-cd with kubernetes, jenkins and helmBuilt in ci-cd with kubernetes, jenkins and helm
Built in ci-cd with kubernetes, jenkins and helm
 
Docker multi-stage build
Docker multi-stage buildDocker multi-stage build
Docker multi-stage build
 
Running Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeRunning Django on Docker: a workflow and code
Running Django on Docker: a workflow and code
 
Webinar: Creating an Effective Docker Build Pipeline for Java Apps
Webinar: Creating an Effective Docker Build Pipeline for Java AppsWebinar: Creating an Effective Docker Build Pipeline for Java Apps
Webinar: Creating an Effective Docker Build Pipeline for Java Apps
 
Webinar: Using Docker Multi-stage Build to Create Advanced Pipelines
Webinar: Using Docker Multi-stage Build to Create Advanced PipelinesWebinar: Using Docker Multi-stage Build to Create Advanced Pipelines
Webinar: Using Docker Multi-stage Build to Create Advanced Pipelines
 
Deployment Automation with Docker
Deployment Automation with DockerDeployment Automation with Docker
Deployment Automation with Docker
 
Auto-scaled Concourse CI on AWS w/o BOSH
Auto-scaled Concourse CI on AWS w/o BOSHAuto-scaled Concourse CI on AWS w/o BOSH
Auto-scaled Concourse CI on AWS w/o BOSH
 
Continuous Deployment with Jenkins on Kubernetes
Continuous Deployment with Jenkins on KubernetesContinuous Deployment with Jenkins on Kubernetes
Continuous Deployment with Jenkins on Kubernetes
 
Testing strategies for Docker containers
Testing strategies for Docker containersTesting strategies for Docker containers
Testing strategies for Docker containers
 
Gitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a proGitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a pro
 
이미지 기반의 배포 패러다임 Immutable infrastructure
이미지 기반의 배포 패러다임 Immutable infrastructure이미지 기반의 배포 패러다임 Immutable infrastructure
이미지 기반의 배포 패러다임 Immutable infrastructure
 
GDG Lima - Docker Compose
GDG Lima - Docker ComposeGDG Lima - Docker Compose
GDG Lima - Docker Compose
 
Webinar: Development Swarm Cluster with Docker Compose V3
Webinar: Development Swarm Cluster with Docker Compose V3Webinar: Development Swarm Cluster with Docker Compose V3
Webinar: Development Swarm Cluster with Docker Compose V3
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Ruby microservices with Docker - Sergii Koba
Ruby microservices with Docker -  Sergii KobaRuby microservices with Docker -  Sergii Koba
Ruby microservices with Docker - Sergii Koba
 
TIAD 2016 : Migrating 100% of your production services to containers
TIAD 2016 : Migrating 100% of your production services to containersTIAD 2016 : Migrating 100% of your production services to containers
TIAD 2016 : Migrating 100% of your production services to containers
 
Development Swarm Cluster
Development Swarm ClusterDevelopment Swarm Cluster
Development Swarm Cluster
 
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
 
Docker orchestration
Docker orchestrationDocker orchestration
Docker orchestration
 
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)CI/CD with Kubernetes, Helm & Wercker (#madScalability)
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
 

Ähnlich wie Angular boilerplate generator

Front End Development Automation with Grunt
Front End Development Automation with GruntFront End Development Automation with Grunt
Front End Development Automation with GruntLadies Who Code
 
Make JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and CleanMake JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and CleanBlue Raster
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Ryan Cuprak
 
Introduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentIntroduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentJames Bundey
 
Serverless Container with Source2Image
Serverless Container with Source2ImageServerless Container with Source2Image
Serverless Container with Source2ImageQAware GmbH
 
Serverless containers … with source-to-image
Serverless containers  … with source-to-imageServerless containers  … with source-to-image
Serverless containers … with source-to-imageJosef Adersberger
 
Android gradle-build-system-overview
Android gradle-build-system-overviewAndroid gradle-build-system-overview
Android gradle-build-system-overviewKevin He
 
Multi modularized project setup with gulp, typescript and angular.js
Multi modularized project setup with gulp, typescript and angular.jsMulti modularized project setup with gulp, typescript and angular.js
Multi modularized project setup with gulp, typescript and angular.jsDavid Amend
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpackNodeXperts
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP ApplicationsPavan Kumar N
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IOded Sagir
 
Puppet camp london nov 2014 slides (1)
Puppet camp london nov 2014   slides (1)Puppet camp london nov 2014   slides (1)
Puppet camp london nov 2014 slides (1)Puppet
 
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...Manuel Garcia
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Docker Meetup Rosenheim: Package & deploy Microservices
Docker Meetup Rosenheim: Package & deploy MicroservicesDocker Meetup Rosenheim: Package & deploy Microservices
Docker Meetup Rosenheim: Package & deploy MicroservicesNico Meisenzahl
 
Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflowRiccardo Coppola
 
Leveraging Composer in Existing Projects
Leveraging Composer in Existing ProjectsLeveraging Composer in Existing Projects
Leveraging Composer in Existing ProjectsMark Niebergall
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAlberto Molina Coballes
 

Ähnlich wie Angular boilerplate generator (20)

Front End Development Automation with Grunt
Front End Development Automation with GruntFront End Development Automation with Grunt
Front End Development Automation with Grunt
 
Make JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and CleanMake JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and Clean
 
Building JavaScript
Building JavaScriptBuilding JavaScript
Building JavaScript
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
 
Introduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentIntroduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme development
 
Serverless Container with Source2Image
Serverless Container with Source2ImageServerless Container with Source2Image
Serverless Container with Source2Image
 
Serverless containers … with source-to-image
Serverless containers  … with source-to-imageServerless containers  … with source-to-image
Serverless containers … with source-to-image
 
Android gradle-build-system-overview
Android gradle-build-system-overviewAndroid gradle-build-system-overview
Android gradle-build-system-overview
 
Multi modularized project setup with gulp, typescript and angular.js
Multi modularized project setup with gulp, typescript and angular.jsMulti modularized project setup with gulp, typescript and angular.js
Multi modularized project setup with gulp, typescript and angular.js
 
Improving build solutions dependency management with webpack
Improving build solutions  dependency management with webpackImproving build solutions  dependency management with webpack
Improving build solutions dependency management with webpack
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP Applications
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session I
 
Puppet camp london nov 2014 slides (1)
Puppet camp london nov 2014   slides (1)Puppet camp london nov 2014   slides (1)
Puppet camp london nov 2014 slides (1)
 
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
Altoros Cloud Foundry Training: hands-on workshop for DevOps, Architects and ...
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Docker Meetup Rosenheim: Package & deploy Microservices
Docker Meetup Rosenheim: Package & deploy MicroservicesDocker Meetup Rosenheim: Package & deploy Microservices
Docker Meetup Rosenheim: Package & deploy Microservices
 
Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflow
 
Leveraging Composer in Existing Projects
Leveraging Composer in Existing ProjectsLeveraging Composer in Existing Projects
Leveraging Composer in Existing Projects
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
 
Spring boot
Spring bootSpring boot
Spring boot
 

Kürzlich hochgeladen

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 

Kürzlich hochgeladen (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 

Angular boilerplate generator

  • 1. ngBoilerplate & generator-angular JS HCM Meetup – presented by Vincent De Smet
  • 2. Why? • Yeoman - Stamp out a skeleton for your app quickly • Try: http://yeoman.io/codelab.html - very good intro! Uses generator-angular
  • 3. Why ngBoilerplate? generator-angular • Package by layer • How to reuse? • How to debug? • Extensive sub-generators • Configuration options ngBoilerplate • Package by module • Lacks sub-generators • Lacks configuration options
  • 4. Yeoman • Yo • Grunt / Gulp • Bower Get started: Install the ngBoilerplate generator globally: Using generator-ngbp.. Last updated on Aug, 28
  • 5. Run generator of your choice
  • 6. Use Bower package management • Uninstall what your project does not allow: • Install what your project requires: *i.e.: Foundation5+libsass instead of bootstrap+less **get sass as developer dependency only!
  • 7. Manage dev dependencies with npm • Add grunt tasks with npm **grunt-sass is a SASS compiler using libsass instead of compass (ruby gem)
  • 8. Customize your task runner (Grunt) • For example: to add sass compilation: 1. Load the grunt-sass tasks: 2. Configure the grunt tasks initConfig ngBoilerplate splits 1. File Config (meta data for task config) 2. Task Config & merges using lodash 3. Register Alias Task, Multi Task for task running goodness - or create your own custom task
  • 9. Customize your task runner (Grunt) - 2 • In File config add sass info • In Task config configure grunt-sass task, multiple Task targets possible Templates are expanded recursively http://gruntjs.com/configuring-tasks#templates
  • 10. Customize your task runner (Grunt) - 3 • A task config can have multiple targets, if no target specified on run, all targets run • A task exposes default options for configuration. Options can be configured at different target level • Most grunt tasks are file operations (source > destination), declaration formats: 1. Compact Format 2. Files Object Format 3. Files Array Format 4. Older formats (won’t go into this)
  • 11. Grunt File operations: Compact Format • ngBoilerplate example: Example: This concat task – build_css target 1 source property ‘scr’ 1 destination property ‘dest’ This format can only have 1 source-destination pair.
  • 12. Grunt File operations: Files Object Format • ngBoilerplate example: Example: This sass task – dist target The property name ‘css/app.css’ is the destination The property value ‘scss/app.scss’ is the source This format can have multiple source – destination pairs
  • 13. Grunt File operations: Files Array Notation • ngBoilerplate example: Example: This copy task – build_app_assets target Array of (src – dest) pairs +properties This format can have multiple source – destination pairs This format can also have additional properties per mapping
  • 14. Grunt file: globbing patterns / +properties • http://gruntjs.com/configuring-tasks#globbing-patterns • http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
  • 15. Registering Tasks • Alias Task • Multi Task Runs a plugin task taking into account the target, looks for configuration in config object. • Basic/Custom Task Example:
  • 16. generator-ngbp – interesting bits: karmaconfig MultiTask : automatically updates the karma config file with all dependencies required to run tests: this.fileSrc http://gruntjs.com/api/inside-tasks#this.filessrc will contain all src files specified in the config object properties for the karmaconfig multi-task Grunt.file.copy http://gruntjs.com/api/grunt.file#grunt.file.copy with a processFunction to render the karma-unit.tpl.js template (expanding all vendor_files.js specified in the grunt config)
  • 17. generator-ngbp – interesting bits: • Bower installed dependencies thus need to be added manually to:
  • 18. Foundation5 / libsass tricky bits • Where to get Foundation5 SASS files? Get sass as developer dependency only! • Copy missing scss files from foundation libsass repo
  • 19. Foundation5 / libsass tricky bits • _settings.scss partial still missing? • Get it from Foundation5 / Compass ruby gem generated directory.. • Update imports • Update gruntfile for Foundation5 sass files and replace recess task by sass task in: • concat:build_css • Index:build & index:compile • delta:sass • build & compile alias tasks
  • 20. Grunt tricks • Could automatically load grunt tasks: https://github.com/sindresorhus/load-grunt-tasks • Better to use https://github.com/shootaroo/jit-grunt for Just In Time loading of grunt tasks • Use https://github.com/sindresorhus/time-grunt to see the benefits • https://github.com/tschaub/grunt-newer to run grunt with newer files only • https://github.com/sindresorhus/grunt-concurrent to run tasks concurrently • Split grunt configuration files http://creynders.github.io/load-grunt-configs • Have fun with github pages, https://github.com/tschaub/grunt-gh-pages
  • 21. What’s next? • Learn Gulp! http://gulpjs.com/ Grunt is old… Gulp is all the rage now. • Write your own Generator… http://yeoman.io/authoring/
  • 22. Generator explosion! • http://www.dancancro.com/comparison-of-angularjs-application-starters/
  • 23. About me Author: Vincent De Smet this presentation source code: https://github.com/so0k/ngbp-foundation-libsass • Presentation prepared for Javascript Ho Chi Minh City Meetup Group You can find us at: • http://www.meetup.com/JavaScript-Ho-Chi-Minh-City/ • https://www.facebook.com/JavaScriptHCMC • https://plus.google.com/u/0/communities/116105314977285194967 • http://www.slideshare.net/JavascriptMeetup

Hinweis der Redaktion

  1. I’m not affiliated with yeoman, bower, grunt, zurb/foundation5 and all images belong to these companies and were blatantly ripped from their website
  2. https://github.com/yeoman/generator-angular/issues/109 The organization by module was a requirement for the project – other generators / templates to consider: https://github.com/CleverStack/frontend-example-module/blob/master/module.js https://github.com/willogden/angular-acorn https://github.com/henyojess/generator-gulp-ng https://github.com/CleverStack/angular-seed https://github.com/pbojinov/generator-gulp-angular-less
  3. Yo sets up the skeleton, can conditionally generate Grunt & Bower configurations Grunt is a build system that can perform simple tasks similar to make/bundle/.. But extension modules provide a lot more powerful workflow. Grunt is heavily file based and goals are reached through task configuration. Since January 2014, Gulp has gained a lot of popularity due to it’s more intuitive stream oriented approach of tasks (without the need of intermediary files) However, Gulp & Grunt do not have to be exclusive: https://github.com/gratimax/gulp-grunt Bower is a package manager used for dependency management on the front end. (todo: better understand relationship between bower and browserify)
  4. https://github.com/thardy/generator-ngbp/commit/3f20f66c76781b978734c7500790edbe47060642
  5. See grunt tricks on automatically loading all tasks or loading JIT
  6. http://www.100percentjs.com/just-like-grunt-gulp-browserify-now/ https://github.com/yeoman/yeoman/issues/1232 https://www.npmjs.org/package/grunt-browserify-bower https://www.youtube.com/channel/UCm9iiIfgmVODUJxINecHQkA http://mindthecode.com/lets-build-an-angularjs-app-with-browserify-and-gulp/ http://mindthecode.com/writing-browserify-modules-for-your-angular-app/ Learn Browserify! http://browserify.org/articles.html
  7. There are simply too many generators to keep track off. Every few months a new technology appears and in my opinion it’s impossible to expect 1 generator that caters for all possible combinations. It’s a matter of finding the best tool for the job and mastering the tools you need.