Giter Site home page Giter Site logo

gulp-removelogs's People

Contributors

gladkih avatar hemanth avatar mtillmann avatar premii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

iskenhuang premii

gulp-removelogs's Issues

Only removing first instance of console.log

It only removes the first instance of console.log in the files.

app.js

(function ($) {

    "use strict";

    $(function() {

        console.log('app.js is running!');

        // Increasing performance by disabling hover state on scrolling
        var body = document.body,
            timer;

        window.addEventListener('scroll', function() {
          clearTimeout(timer);
          if(!body.classList.contains('disable-hover')) {
            body.classList.add('disable-hover')
          }

          timer = setTimeout(function(){
            body.classList.remove('disable-hover')
          },300);
        }, false);

        console.log('test');

    });
}(jQuery));
var test = {
    lol: function() {
        console.log('Kanelbulle');
    }
}

gulp task

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

    return gulp.src('assets/js/app.js')
    .pipe(removeLogs())
    .pipe(rename({suffix: '.min' }))
    .pipe(uglify())
    .pipe(gulp.dest('assets/js'));

});

app.min.js

!function(e){"use strict";e(function(){var e,o=document.body;window.addEventListener("scroll",function(){clearTimeout(e),o.classList.contains("disable-hover")||o.classList.add("disable-hover"),e=setTimeout(function(){o.classList.remove("disable-hover")},300)},!1),console.log("test")})}(jQuery);var test={lol:function(){console.log("Kanelbulle")}};

Error: Cannot find module 'gulp-util'

Hi, just to let you know that gulp-removelogs has a dependency with gulp-util.
If you only install gulp-removelogs you get a Error: Cannot find module 'gulp-util'.

Thanks for the tool,

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.