SlideShare une entreprise Scribd logo
1  sur  16
Introduction to npm,
Gulp, Bower
Nat
20150206
Agenda
• npm
• gulp
• bower
npm
• npm: node package manager
• npm init
• npm install
package.json
1. {
2. "name": "20150206",
3. "version": "0.0.0",
4. "description": "",
5. "main": "index.js",
6. "scripts": {
7. "test": "echo "Error: no test specified" && exit 1"
8. },
9. "author": "",
10. "license": "ISC"
11. }
gulp
• npm install gulp
• npm install -g gulp
• C:Users{User}AppDataRoamingnpmnode_modules
• npm install --save-dev gulp
• npm install --save gulp
package.json
• {
• "name": "init-gulp",
• "version": "0.0.0",
• "dependencies": {
• "gulp": "~3.8.10"
• },
• "devDependencies": {},
• }
Package Version
• version rule
• "gulp": "3.8.10"
• "gulp": "~3.8.10"
• "gulp": "^3.8.10"
• "gulp": "latest"
=> install “3.8.10”
=> install “3.8.x” and >= 3.8.10
=> install “3.x.x” and >= 3.8.10
gulpfile.js
• type null > gulpfile.js
1. var gulp = require('gulp');
2. gulp.task('default', function() {
3. // place code for your default task here
4. console.log('Hello world');
5. });
bower
• npm install -g bower
• npm install --save-dev bower
• bower init
• bower install
bower.json
1. {
2. "name": "init-bower",
3. "version": "0.0.0",
4. "authors": [
5. "natqiu
<naspenant@gmail.com>"
6. ],
7. "license": "MIT",
8. "ignore": [
9. "**/.*",
10. "node_modules",
11. "bower_components",
12. "test",
13. "tests"
14. ]
15. }
Use bower install Client-Side Packages
• bower search bootstrap
• bower install --save bootstrap
• bower_components
• bootstrap
• jquery
change default bower_components folder
• .bowerrc
• type null > .bowerrc
1. {
2. "directory": "app/components/",
3. "analytics": false,
4. "timeout": 120000,
5. "registry": {
6. "search": [
7. "http://localhost:8000",
8. "https://bower.herokuapp.com"
9. ]
10. }
11. }
Task Runner Explorer
• https://visualstudiogallery.msdn.microsoft.com/8e1b4368-4afb-
467a-bc13-9650572db708
VS2015 ASP.NET 5 Project Template
Current gulpfile.js
References
• https://www.npmjs.com/
• http://gulpjs.com/
• http://bower.io/
• http://www.asp.net/vnext/overview/aspnet-vnext/grunt-and-
bower-in-visual-studio-2015

Contenu connexe

Tendances

Jenkins and Groovy
Jenkins and GroovyJenkins and Groovy
Jenkins and Groovy
Kiyotaka Oku
 
Provisioning with Puppet
Provisioning with PuppetProvisioning with Puppet
Provisioning with Puppet
Joe Ray
 
Nodejs quick start
Nodejs quick startNodejs quick start
Nodejs quick start
Guangyao Cao
 
Nginx - The webserver you might actually like
Nginx - The webserver you might actually likeNginx - The webserver you might actually like
Nginx - The webserver you might actually like
Edorian
 

Tendances (20)

Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.Improving WordPress Theme Development Workflow - Naveen Kharwar.
Improving WordPress Theme Development Workflow - Naveen Kharwar.
 
Elastic search
Elastic searchElastic search
Elastic search
 
Simple webapps with nginx, uwsgi emperor and bottle
Simple webapps with nginx, uwsgi emperor and bottleSimple webapps with nginx, uwsgi emperor and bottle
Simple webapps with nginx, uwsgi emperor and bottle
 
Node Web Development 2nd Edition: Chapter2 Setup Node and NPM
Node Web Development 2nd Edition: Chapter2 Setup Node and NPMNode Web Development 2nd Edition: Chapter2 Setup Node and NPM
Node Web Development 2nd Edition: Chapter2 Setup Node and NPM
 
20151229 wnmp & phalcon micro app - part I
20151229 wnmp & phalcon micro app - part I20151229 wnmp & phalcon micro app - part I
20151229 wnmp & phalcon micro app - part I
 
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
JS Lab2017_Андрей Кучеренко _Разработка мультипакетных приложения: причины, с...
 
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
Mage Titans USA 2016 - Miguel Balparda - Magento 2: Premium Performance with ...
 
Jenkins and Groovy
Jenkins and GroovyJenkins and Groovy
Jenkins and Groovy
 
[Js hcm] Deploying node.js with Forever.js and nginx
[Js hcm] Deploying node.js with Forever.js and nginx[Js hcm] Deploying node.js with Forever.js and nginx
[Js hcm] Deploying node.js with Forever.js and nginx
 
Redis way of Anayltics with Python - Fifth Elephant 2012
Redis way of Anayltics with Python - Fifth Elephant 2012Redis way of Anayltics with Python - Fifth Elephant 2012
Redis way of Anayltics with Python - Fifth Elephant 2012
 
Provisioning with Puppet
Provisioning with PuppetProvisioning with Puppet
Provisioning with Puppet
 
Nodejs quick start
Nodejs quick startNodejs quick start
Nodejs quick start
 
Vagrant and CentOS 7
Vagrant and CentOS 7Vagrant and CentOS 7
Vagrant and CentOS 7
 
Jean-Baptiste Favre - How to Monitor Bilions of Miles Shared by 20 Million Us...
Jean-Baptiste Favre - How to Monitor Bilions of Miles Shared by 20 Million Us...Jean-Baptiste Favre - How to Monitor Bilions of Miles Shared by 20 Million Us...
Jean-Baptiste Favre - How to Monitor Bilions of Miles Shared by 20 Million Us...
 
NODE NYC
NODE NYCNODE NYC
NODE NYC
 
Learn nginx in 90mins
Learn nginx in 90minsLearn nginx in 90mins
Learn nginx in 90mins
 
Nginx - The webserver you might actually like
Nginx - The webserver you might actually likeNginx - The webserver you might actually like
Nginx - The webserver you might actually like
 
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
 
Odoo development workflow with pip and virtualenv
Odoo development workflow with pip and virtualenvOdoo development workflow with pip and virtualenv
Odoo development workflow with pip and virtualenv
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
 

Similaire à Report introduction to_npm_gulp_bower

Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chef
LeanDog
 
Make JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and CleanMake JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and Clean
Blue Raster
 

Similaire à Report introduction to_npm_gulp_bower (20)

Node.js/io.js Native C++ Addons
Node.js/io.js Native C++ AddonsNode.js/io.js Native C++ Addons
Node.js/io.js Native C++ Addons
 
GDG Kraków - Intro to front-end automation using bower.js & grunt.js
GDG Kraków - Intro to front-end automation using bower.js & grunt.jsGDG Kraków - Intro to front-end automation using bower.js & grunt.js
GDG Kraków - Intro to front-end automation using bower.js & grunt.js
 
Gulp js
Gulp jsGulp js
Gulp js
 
Hello npm
Hello npmHello npm
Hello npm
 
Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chef
 
Mastering composer
Mastering composerMastering composer
Mastering composer
 
FIWARE Global Summit - Building Your Own IoT Agent
FIWARE Global Summit - Building Your Own IoT AgentFIWARE Global Summit - Building Your Own IoT Agent
FIWARE Global Summit - Building Your Own IoT Agent
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end Workflow
 
Sử dụng Gulp trong phát triển theme
Sử dụng Gulp trong phát triển themeSử dụng Gulp trong phát triển theme
Sử dụng Gulp trong phát triển theme
 
Make JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and CleanMake JavaScript Lean, Mean, and Clean
Make JavaScript Lean, Mean, and Clean
 
Cypress.pptx
Cypress.pptxCypress.pptx
Cypress.pptx
 
Modern Development Tools
Modern Development ToolsModern Development Tools
Modern Development Tools
 
2017 Codemotion OWASP ZAP in CI/CD
2017 Codemotion OWASP ZAP in CI/CD2017 Codemotion OWASP ZAP in CI/CD
2017 Codemotion OWASP ZAP in CI/CD
 
nodecalgary1
nodecalgary1nodecalgary1
nodecalgary1
 
AllDayDevOps ZAP automation in CI
AllDayDevOps ZAP automation in CIAllDayDevOps ZAP automation in CI
AllDayDevOps ZAP automation in CI
 
SCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStackSCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStack
 
Benchmarking at Parse
Benchmarking at ParseBenchmarking at Parse
Benchmarking at Parse
 
Advanced Benchmarking at Parse
Advanced Benchmarking at ParseAdvanced Benchmarking at Parse
Advanced Benchmarking at Parse
 
Angular2 inter3
Angular2 inter3Angular2 inter3
Angular2 inter3
 
Automating OWASP ZAP - DevCSecCon talk
Automating OWASP ZAP - DevCSecCon talk Automating OWASP ZAP - DevCSecCon talk
Automating OWASP ZAP - DevCSecCon talk
 

Plus de LearningTech (20)

vim
vimvim
vim
 
PostCss
PostCssPostCss
PostCss
 
ReactJs
ReactJsReactJs
ReactJs
 
Docker
DockerDocker
Docker
 
Semantic ui
Semantic uiSemantic ui
Semantic ui
 
node.js errors
node.js errorsnode.js errors
node.js errors
 
Process control nodejs
Process control nodejsProcess control nodejs
Process control nodejs
 
Expression tree
Expression treeExpression tree
Expression tree
 
SQL 效能調校
SQL 效能調校SQL 效能調校
SQL 效能調校
 
flexbox report
flexbox reportflexbox report
flexbox report
 
Vic weekly learning_20160504
Vic weekly learning_20160504Vic weekly learning_20160504
Vic weekly learning_20160504
 
Reflection &amp; activator
Reflection &amp; activatorReflection &amp; activator
Reflection &amp; activator
 
Peggy markdown
Peggy markdownPeggy markdown
Peggy markdown
 
Node child process
Node child processNode child process
Node child process
 
20160415ken.lee
20160415ken.lee20160415ken.lee
20160415ken.lee
 
Peggy elasticsearch應用
Peggy elasticsearch應用Peggy elasticsearch應用
Peggy elasticsearch應用
 
Expression tree
Expression treeExpression tree
Expression tree
 
Vic weekly learning_20160325
Vic weekly learning_20160325Vic weekly learning_20160325
Vic weekly learning_20160325
 
D3js learning tips
D3js learning tipsD3js learning tips
D3js learning tips
 
git command
git commandgit command
git command
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 

Report introduction to_npm_gulp_bower

  • 1. Introduction to npm, Gulp, Bower Nat 20150206
  • 3. npm • npm: node package manager • npm init • npm install
  • 4. package.json 1. { 2. "name": "20150206", 3. "version": "0.0.0", 4. "description": "", 5. "main": "index.js", 6. "scripts": { 7. "test": "echo "Error: no test specified" && exit 1" 8. }, 9. "author": "", 10. "license": "ISC" 11. }
  • 5. gulp • npm install gulp • npm install -g gulp • C:Users{User}AppDataRoamingnpmnode_modules • npm install --save-dev gulp • npm install --save gulp
  • 6. package.json • { • "name": "init-gulp", • "version": "0.0.0", • "dependencies": { • "gulp": "~3.8.10" • }, • "devDependencies": {}, • }
  • 7. Package Version • version rule • "gulp": "3.8.10" • "gulp": "~3.8.10" • "gulp": "^3.8.10" • "gulp": "latest" => install “3.8.10” => install “3.8.x” and >= 3.8.10 => install “3.x.x” and >= 3.8.10
  • 8. gulpfile.js • type null > gulpfile.js 1. var gulp = require('gulp'); 2. gulp.task('default', function() { 3. // place code for your default task here 4. console.log('Hello world'); 5. });
  • 9. bower • npm install -g bower • npm install --save-dev bower • bower init • bower install
  • 10. bower.json 1. { 2. "name": "init-bower", 3. "version": "0.0.0", 4. "authors": [ 5. "natqiu <naspenant@gmail.com>" 6. ], 7. "license": "MIT", 8. "ignore": [ 9. "**/.*", 10. "node_modules", 11. "bower_components", 12. "test", 13. "tests" 14. ] 15. }
  • 11. Use bower install Client-Side Packages • bower search bootstrap • bower install --save bootstrap • bower_components • bootstrap • jquery
  • 12. change default bower_components folder • .bowerrc • type null > .bowerrc 1. { 2. "directory": "app/components/", 3. "analytics": false, 4. "timeout": 120000, 5. "registry": { 6. "search": [ 7. "http://localhost:8000", 8. "https://bower.herokuapp.com" 9. ] 10. } 11. }
  • 13. Task Runner Explorer • https://visualstudiogallery.msdn.microsoft.com/8e1b4368-4afb- 467a-bc13-9650572db708
  • 14. VS2015 ASP.NET 5 Project Template
  • 16. References • https://www.npmjs.com/ • http://gulpjs.com/ • http://bower.io/ • http://www.asp.net/vnext/overview/aspnet-vnext/grunt-and- bower-in-visual-studio-2015