Code Monkey home page Code Monkey logo

tasks's Introduction

Tasks

Tasks de uso comum.

Gulp Clean CSS

Task para minificar arquivos css

Instalação:

npm i -D gulp-clean-css

Repositório

gulp-clean-css

Uso

gulp.task('css', function(){
    gulp.src([
        './path/to/your/file.css',
        './path/to/your/another-file.css'
    ])
        .pipe(concat('app.min.css'))
        .pipe(cssMin())
        .pipe(gulp.dest('./path/to/minified'));
});

Gulp Uglify

Task para minificar arquivos js

Instalação:

npm i -D gulp-uglify

Repositório

gulp-uglify

Uso

gulp.task('js', function(){
    gulp.src([
        './path/to/your/file.js',
        './path/to/your/another-file.js'
    ])
        .pipe(concat('app.min.js'))
        .pipe(uglify())
        .pipe(gulp.dest('./path/to/minified'));
});

Gulp Concat

Task para concatern arquivos em um único

Instalação:

npm i -D gulp-concat

Repositório

gulp-concat

Uso

Uso demonstrado em gulp-clean-css e gulp-uglify.

Gulp Watch

Task para observar mudanças em arquivos

Instalação:

npm i -D gulp-watch

Repositório

gulp-watch

Uso

gulp.task('watch', function(){
    gulp.watch('./path/to/your/cssfiles/*.css', ['task']);
    gulp.watch('./path/to/your/jsfiles/*.js', ['another-task']);
});

Gulp Deploy

Task para realizar Deploy

Instalação:

npm i -D gulp-util vinyl-ftp

Uso

Uso demonstrado em gulp-clean-css e gulp-uglify.

Uso

gulp.task('deploy', function () {

    var conn = ftp.create({
        host:     '',
        user:     '',
        password: '',
        parallel: 10,
        log: gutil.log
    });

    var globs = [
        '**/*',
        '!gulpfile.js',
        '!vendor{,/**}',
        '!node_modules{,/**}'
    ];


    return gulp.src(globs, {base: '.', buffer: false})
        .pipe(conn.newer(''))
        .pipe(conn.dest(''));
});

tasks's People

Contributors

cleitonper avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.