Combinarea de taskuri

postat acum 2 ani de Stefanescu Mihai in categorie Gulp

Taskurile ne permit sa configuram Gulp intr-un mod modular.Trebuie sa facem cate un task pentru fiecare dependenta, ceea ce inseamna ca trebuie sa gasim si sa instalam plugin-uri ce ne sunt necesare.

Instalarea de plugin-uri

Hai sa ne uitam la acest plugin numit minify-css care uneste fisierele css si le face minify. Poate fi instalat folosind urmatoarea comanda:

npm install gulp-minify-css --save-dev

Pentru a folosi acest plugin trebuie sa instalam inca un plugin numit "gulp-autoprefixer"

npm install gulp-autoprefixer --save-dev

Pentru a concatena fisierele CSS trebuie sa instalam si plugin-ul "gulp-concat"

npm install gulp-concat --save-dev

Dupa ce am instalat aceste plugin-uri trebuie sa scriem dependintele in fisierul de configurare:

var autoprefix = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css');
var concat = require('gulp-concat');

Adaugarea unui task in Gulp

Acum trebuie sa facem cate un task pentru fiecare dependinta.

gulp.task('styles', function() {
   gulp.src(['src/styles/*.css'])
   .pipe(concat('styles.css'))
   .pipe(autoprefix('last 2 versions'))
   .pipe(minifyCSS())
   .pipe(gulp.dest('build/styles/'));});

Plugin-ul 'concat' va concatena toate fisierele intr-un singur fisier, plugin-ul 'autoprefix' adauga prefixele necesare in functie de browsere, iar minifyCSS cred ca este destul de usor de inteles ce face.

Pentru a rula acest task rulam urmatoarea comanda in folderul proiectului

gulp styles

Combinarea mai multor task-uri

Putem rula mai multe task-uri facand un task default in fisierul de configurare:

gulp.task('default', ['imagemin', 'styles'], function() {

});

Fisierul gulp este gata de executie. Rulam codul de mai jos pentru a rula task-urile combinate:

gulp

 

Sunt un tanar programator din Bucuresti ce lucreaza in PHP/Mysql (MySqli/PDO), Laravel, CodeIgniter, MySQL, PostgreSQL, Wordpress, HTML5/CSS3, Sass, Photoshop si multe altele.
Google+ Community Facebook Group

Comentariu postate de minecraft download free pc la data de 14.05.2019
This is my first time go to see at here and i am in fact happy to read all at one place.
Comentariu postate de lebron james shoes la data de 14.05.2019
I not to mention my guys came looking at the excellent solutions on your site and then before long came up with an awful feeling I had not thanked you for them. My women are actually for this reason thrilled to read through all of them and have now seriously been making the most of those things. Many thanks for genuinely well helpful as well as for getting variety of brilliant things millions of individuals are really wanting to learn about. My sincere regret for not saying thanks to sooner.
Comentariu postate de minecraft download mojang la data de 16.05.2019
When some one searches for his necessary thing, therefore he/she needs to be available that in detail, therefore that thing is maintained over here.
Comentariu postate de download minecraft free la data de 17.05.2019
I am regular visitor, how are you everybody? This piece of writing posted at this website is in fact nice.
Comentariu postate de hvsjCluth la data de 10.07.2019
online canadian pharmacy http://canadian-pharmacyonlineolys.com/ - canadian pharmacy online cialis viagra online п»їsovaldi canadian online pharmacy reviews http://canadian-pharmacyonlineolys.com/
Comentariu postate de vfxxBurry la data de 10.07.2019
viagra online canadian pharmacy http://canadianonline-pharmacydazc.com/ - canadian online pharmacy reviews canadian online pharmacy cialis generic viagra canadian online pharmacy http://canadianonline-pharmacydazc.com/
Comentariu postate de zzwsCalt la data de 10.07.2019
mexican pharmacy online http://pharmacyonlinevfr.com/ - viagra walgreens online pharmacy cvs online pharmacy walgreens online pharmacy http://pharmacyonlinevfr.com/
Comentariu postate de vdahCalt la data de 10.07.2019
certified canadian pharmacies http://canadian-pharmaciesthsh.com/ - online canadian pharmacies best online canadian pharmacies canadian pharmacies online prescriptions online canadian pharmacies http://canadian-pharmaciesthsh.com/
Comentariu postate de bthdFuece la data de 11.07.2019
canada pharmacy http://canadapharmacyonlinestbh.com/ - pharmacy canada canada pharmacy review canada pharmacy com resource http://canadapharmacyonlinestbh.com/
Comentariu postate de bbuiDurce la data de 11.07.2019
original site http://pharmacy-onlineasxs.com/ - п»їfildena cheap viagra online canadian pharmacy viagra hims http://pharmacy-onlineasxs.com/
Comentariu postate de gzwssnifs la data de 11.07.2019
prescription drugs from canada http://canadadrugsonlinevbyh.com/ - related site cialis canada drugs coupon check my site http://canadadrugsonlinevbyh.com/
Comentariu postate de bsffbatte la data de 11.07.2019
viagra http://canadadrugslopl.com/ - canada drugs laws full report canada drugs coupon code viagra online http://canadadrugslopl.com/
Comentariu postate de vfsfCycle la data de 11.07.2019
viagra canadian pharmacy http://canadian-pharmacyyhzg.com/ - online canadian pharmacy canadian pharmacy viagra canadian pharmacy reviews canadian pharmacy viagra http://canadian-pharmacyyhzg.com/
Comentariu postate de vsxxAmaky la data de 11.07.2019
canadian pharmacy online cialis http://canadianonlinepharmacyfdth.com/ - click here to read purchase canadian pharmacy online brand viagra online canadian pharmacy http://canadianonlinepharmacyfdth.com/
Comentariu postate de bfxflede la data de 12.07.2019
online pharmacy in canada http://canadapharmacyliiu.com/ - troche pharmacy canada online pharmacy canada canada pharmacy review http://canadapharmacyliiu.com/
Comentariu postate de rhdsjCluth la data de 12.07.2019
canadian online pharmacy cialis http://canadian-pharmacyonlineolys.com/ - doctor best canadian pharmacy online п»їpurchase canadian online pharmacy no prescription http://canadian-pharmacyonlineolys.com/
Comentariu postate de jfhhBurry la data de 12.07.2019
best online canadian pharmacy review http://canadianonline-pharmacydazc.com/ - patient legit canadian pharmacy online legit canadian online pharmacy viagra online canadian pharmacy http://canadianonline-pharmacydazc.com/
Comentariu postate de ejgsCalt la data de 12.07.2019
pharmacy online http://pharmacyonlinevfr.com/ - check out this site check our site costco online pharmacy http://pharmacyonlinevfr.com/
Comentariu postate de yjahCalt la data de 12.07.2019
click this site http://canadian-pharmaciesthsh.com/ - certified canadian pharmacies check out your url buy generic viagra http://canadian-pharmaciesthsh.com/
Comentariu postate de htkdFuece la data de 13.07.2019
canada pharmacy trust http://canadapharmacyonlinestbh.com/ - pharmacy in canada trust pharmacy canada canada pharmacy online canada drug pharmacy http://canadapharmacyonlinestbh.com/
Comentariu postate de rhssDurce la data de 13.07.2019
cvs pharmacy online http://pharmacy-onlineasxs.com/ - zenegra online canadian pharmacy canadian pharmacy online online canadian pharmacy http://pharmacy-onlineasxs.com/
Comentariu postate de htjesnifs la data de 13.07.2019
buy drugs from canada http://canadadrugsonlinevbyh.com/ - viagra online canada drugs online review prescription drugs from canada cialis http://canadadrugsonlinevbyh.com/
Comentariu postate de jrgdbatte la data de 13.07.2019
canada drugs coupon code http://canadadrugslopl.com/ - generic viagra canada drugs canada drugs closing perscription drugs from canada http://canadadrugslopl.com/
Comentariu postate de hecxCycle la data de 13.07.2019
viagra online canadian pharmacy http://canadian-pharmacyyhzg.com/ - canadian pharmacy no scripts additional reading click for more canadian pharmacy online reviews http://canadian-pharmacyyhzg.com/
Comentariu postate de thyxAmaky la data de 13.07.2019
online canadian pharmacy reviews http://canadianonlinepharmacyfdth.com/ - buy viagra cheap viagra online canadian pharmacy cialis online canadian pharmacy review http://canadianonlinepharmacyfdth.com/
Comentariu postate de ikloSalay la data de 13.07.2019
cialis online http://onlinepharmacyzefb.com/ - online pharmacy without scripts best online pet pharmacy online pharmacy reviews canadian online pharmacy http://onlinepharmacyzefb.com/
Comentariu postate de jfgflede la data de 14.07.2019
viagra canada pharmacy http://canadapharmacyliiu.com/ - viagra canada pharmacy canada pharmacy reviews cialis canada pharmacy tadora http://canadapharmacyliiu.com/
Comentariu postate de kinnCluth la data de 14.07.2019
canadian pharmacies http://canadapharmacyonlineegol.com/ - canadian online pharmacy best online canadian pharmacy canada pharmacy online canadian pharmacy online http://canadapharmacyonlineegol.com/
Comentariu postate de bbczBurry la data de 14.07.2019
canada drugs online http://canadapharmacysfzr.com/ - canadian pharmacies online canadian pharmacy online canadian pharmacy canada drug pharmacy http://canadapharmacysfzr.com/
Comentariu postate de grdfCalt la data de 14.07.2019
canadian online pharmacy http://canadapharmacyonlinefako.com/ - best canadian online pharmacy canada online pharmacy canada pharmacy online canada online pharmacy http://canadapharmacyonlinefako.com/
Comentariu postate de jtcwCalt la data de 15.07.2019
canadian pharmacy online http://canadianpharmacyonlinervii.com/ - best canadian online pharmacy online canadian pharmacy canadian online pharmacy canada pharmacy http://canadianpharmacyonlinervii.com/
Comentariu postate de iyvvFuece la data de 15.07.2019
best canadian online pharmacy http://canadianpharmacyonlinejycx.com/ - best canadian online pharmacy canadian online pharmacy canadian online pharmacy canadian pharmacy online http://canadianpharmacyonlinejycx.com/
Comentariu postate de olbeDurce la data de 15.07.2019
online pharmacy reviews http://canadadrugshtwi.com/ - best canadian online pharmacy best online pharmacy canadian online pharmacy canadian pharmacy online http://canadadrugshtwi.com/
Comentariu postate de olposnifs la data de 15.07.2019
best canadian online pharmacy http://canadianpharmacieshdfc.com/ - online canadian pharmacy online pharmacy reviews online pharmacy canada online pharmacy http://canadianpharmacieshdfc.com/
Comentariu postate de grffbatte la data de 15.07.2019
canada drug pharmacy http://canadadrugsonlinewxwe.com/ - canada drug pharmacy canadian online pharmacy canadian pharmacy canadian online pharmacy http://canadadrugsonlinewxwe.com/
Comentariu postate de hrffCycle la data de 16.07.2019
best canadian online pharmacy http://canadianonlinepharmacystbm.com/ - online canadian pharmacy canada pharmacy online canadian online pharmacy canada pharmacy online http://canadianonlinepharmacystbm.com/
Comentariu postate de jtjjAmaky la data de 16.07.2019
canadian pharmacy online http://onlinepharmacysrba.com/ - canada pharmacy canada drugs online canadian pharmacies canada online pharmacy http://onlinepharmacysrba.com/
Comentariu postate de olkkSalay la data de 16.07.2019
canadian pharmacy online http://canadianpharmacyecyn.com/ - canadian online pharmacy online canadian pharmacy canada online pharmacy canada online pharmacy http://canadianpharmacyecyn.com/
Comentariu postate de hykdCluth la data de 17.07.2019
п»їbuy generic viagra online http://viagrapfhze.com/ - canadian pharmacy online best place to buy generic viagra online canadian pharmacy online canadian pharmacy online http://viagrapfhze.com/
Comentariu postate de faseBurry la data de 17.07.2019
cheap viagra online canadian pharmacy http://genericonlineviaqra.com/ - viagra online without prescription best place to buy generic viagra online cheap viagra online canadian pharmacy cheap viagra online canadian pharmacy http://genericonlineviaqra.com/
Comentariu postate de vdvzCalt la data de 17.07.2019
viagra online canadian pharmacy http://onlineviaqer.com/ - viagra online canadian pharmacy viagra online without prescription viagra online without prescription viagra online canadian pharmacy http://onlineviaqer.com/
Comentariu postate de btsdCalt la data de 18.07.2019
п»їbest place to buy generic viagra online http://sexviagen.com/ - viagra online canadian pharmacy viagra online canadian pharmacy п»їbest place to buy generic viagra online viagra without a doctor prescription http://sexviagen.com/
Comentariu postate de ikloFuece la data de 18.07.2019
best place to buy generic viagra online http://erectiledysfunctionmedicinesus.com/ - п»їbuy generic viagra online п»їbuy generic viagra online canadian pharmacy generic viagra canadian pharmacy generic viagra http://erectiledysfunctionmedicinesus.com/
Comentariu postate de vxwwDurce la data de 18.07.2019
buy generic viagra online http://viagranerrds.com/ - п»їbest place to buy generic viagra online viagra online canadian pharmacy buy generic viagra online buy generic viagra online http://viagranerrds.com/
Comentariu postate de gtgdsnifs la data de 18.07.2019
п»їbuy generic viagra online http://viagracefo.com/ - п»їbuy generic viagra online п»їbuy generic viagra online canadian pharmacy online п»їbuy generic viagra online http://viagracefo.com/
Comentariu postate de bfccCycle la data de 19.07.2019
viagra without a doctor prescription http://qenericviaqra.com/ - viagra without a doctor prescription buy viagra online viagra without a doctor prescription п»їbuy generic viagra http://qenericviaqra.com/
Comentariu postate de gdcdAmaky la data de 19.07.2019
viagra online canadian pharmacy http://bestbuymaleenhancement.com/ - viagra online canadian pharmacy viagra online canadian pharmacy generic viagra reviews best place to buy generic viagra online http://bestbuymaleenhancement.com/
Comentariu postate de ikkuflede la data de 19.07.2019
viagra online without prescription http://viagraveikd.com/ - best place to buy generic viagra online best place to buy generic viagra online buy generic viagra online viagra online without prescription http://viagraveikd.com/
Comentariu postate de hcrtCluth la data de 19.07.2019
viagra without a prescription http://hpviagrajoagin.com/ - п»їviagra without a doctor prescription п»їviagra without a doctor prescription viagra without a prescription п»їviagra without a doctor prescription http://hpviagrajoagin.com/
Comentariu postate de saawBurry la data de 19.07.2019
viagra online canadian pharmacy http://viagraid.com/ - generic viagra online pharmacy generic viagra online pharmacy buy generic viagra online viagra online canadian pharmacy http://viagraid.com/
Comentariu postate de hkcrFuece la data de 20.07.2019
best place to buy cialis online http://cialisheobg.com/ - п»їbuy generic cialis online where to buy cialis online п»їbuy generic cialis online where to buy cialis online http://cialisheobg.com/
Comentariu postate de unyyDurce la data de 20.07.2019
where to buy cialis online http://cialishe.com/ - buy generic cialis online where to buy cialis online п»їbest place to buy cialis online buy generic cialis online http://cialishe.com/
Comentariu postate de yhjksnifs la data de 20.07.2019
generic viagra online http://saresltd.com/ - best place to buy generic viagra online best place to buy generic viagra online generic viagra online best place to buy generic viagra online http://saresltd.com/
Comentariu postate de yjkdbatte la data de 20.07.2019
cialis online pharmacy http://cialisfw.com/ - buy generic cialis online buy generic cialis online cialis online pharmacy cialis online pharmacy http://cialisfw.com/
Comentariu postate de vdvxCycle la data de 20.07.2019
п»їcialis online no prescription http://valcialisns.com/ - buy cialis without prescription buy generic cialis online buy cialis without prescription buy generic cialis online http://valcialisns.com/
Comentariu postate de thhtAmaky la data de 20.07.2019
best place to buy cialis online http://cialishwzbm.com/ - best place to buy cialis online buy generic cialis online best place to buy cialis online best place to buy cialis online http://cialishwzbm.com/
Comentariu postate de edseSalay la data de 20.07.2019
п»їbuy generic viagra online http://viagrajr.com/ - cheap viagra online canadian pharmacy viagra online no prior prescription cheap viagra online canadian pharmacy cheap viagra online canadian pharmacy http://viagrajr.com/
Comentariu postate de xedfflede la data de 21.07.2019
cheap viagra online canadian pharmacy http://viagraeq.com/ - best place to buy generic viagra online buy generic viagra online cheap viagra online canadian pharmacy buy generic viagra online http://viagraeq.com/
Comentariu postate de vkiaCluth la data de 21.07.2019
cialis online pharmacy http://tokatadres.com/ - cialis online pharmacy best place to buy cialis online reviews best place to buy cialis online reviews п»їbest place to buy cialis online http://tokatadres.com/
Comentariu postate de saswBurry la data de 21.07.2019
buy generic viagra online http://onlinewwwmen.com/ - buy generic viagra online buy generic viagra online buy generic viagra online buy generic viagra online http://onlinewwwmen.com/
Comentariu postate de awxaFuece la data de 22.07.2019
generic viagra without a doctor prescription http://emtpartsstore.com/ - viagra online canadian pharmacy п»їbuy generic viagra online viagra online canadian pharmacy п»їbuy generic viagra online http://emtpartsstore.com/
Comentariu postate de cdbsDurce la data de 22.07.2019
buy generic cialis online http://forumdemulheres.com/ - cialis online no prescription п»їbest place to buy cialis online buy generic cialis online cialis online no prescription http://forumdemulheres.com/
Comentariu postate de zaqasnifs la data de 22.07.2019
buy generic cialis online http://hitcialisosn.com/ - buy generic cialis online cialis online no prescription п»їbuy cialis without prescription buy generic cialis online http://hitcialisosn.com/
Comentariu postate de yjsabatte la data de 22.07.2019
when will generic viagra be available http://greengenericjen.com/ - п»їbest place to buy generic viagra online п»їbest place to buy generic viagra online п»їbest place to buy generic viagra online generic viagra online canadian pharmacy http://greengenericjen.com/
Comentariu postate de awxdCycle la data de 22.07.2019
п»їviagra online without prescription http://loviagraosn.com/ - viagra online canadian pharmacy п»їviagra online without prescription п»їviagra online without prescription п»їviagra online without prescription http://loviagraosn.com/