Curatarea de fisiere nedorite

postat acum 2 ani de Stefanescu Mihai in categorie Gulp

In acest ultim articol am sa va vorbesc despre cum putem scapa de fisierele nedorite generate. In timp ce generam fisiere automat trebuie sa ne asiguram ca fisierele inutile sunt sterse. Acest proces se numeste cleaning si vom folosi plugin-ul numit del.

Instalare

In terminal scriem urmatoarea comanda:

npm install del --save-dev

Declararea de dependinte si crearea taskului

In fisierul de configurare, gulpfile.js declaram dependintele astfel:

var del = require('del');

Apoi trebuie sa facem un task astfel:

gulp.task('clean:build', function() {
   return del.sync('build');
});

Taskul de mai sus va curata tot build-ul. Task-ul clean va curata orice fisier sau imagine ce nu ar trebui sa fie in build.

Este posibil sa curatam numai anumite fisiere si sau foldere, iar pe altele sa le lasam asa cum sunt.

gulp.task('clean:build', function() {
   return del([
      'build/temp/',
      '!build/package.json'
});

In acest task numai folderul build/temp va fi curatat si va lasa numai package.json acolo.

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 how to download minecraft la data de 14.05.2019
Thank you, I've recently been searching for information about this topic for a long time and yours is the greatest I have discovered so far. But, what about the bottom line? Are you positive in regards to the supply?
Comentariu postate de minecraft free download pc la data de 14.05.2019
I every time spent my half an hour to read this webpage's articles or reviews every day along with a cup of coffee.
Comentariu postate de free minecraft download la data de 16.05.2019
Pretty component to content. I just stumbled upon your web site and in accession capital to assert that I get in fact enjoyed account your weblog posts. Any way I'll be subscribing for your augment and even I achievement you get right of entry to constantly fast.
Comentariu postate de mojang minecraft download la data de 16.05.2019
hi!,I love your writing so so much! proportion we keep up a correspondence extra about your article on AOL? I require a specialist in this house to resolve my problem. Maybe that is you! Taking a look forward to peer you.
Comentariu postate de yeezy boost 350 la data de 17.05.2019
Thank you so much for providing individuals with remarkably special opportunity to read critical reviews from here. It is often very fantastic and packed with a lot of fun for me personally and my office colleagues to visit the blog minimum three times a week to read through the new items you have. And indeed, I'm at all times motivated with the astonishing methods served by you. Some 2 tips on this page are undoubtedly the most effective we've ever had.
Comentariu postate de minecraft download pc la data de 17.05.2019
Attractive part of content. I simply stumbled upon your blog and in accession capital to say that I get actually enjoyed account your blog posts. Anyway I'll be subscribing in your augment or even I achievement you get entry to constantly fast.