Пользователь пока ничего не рассказал о себе

Наибольший вклад в теги

Все теги (3)

Лучшие ответы пользователя

Все ответы (1)
  • Grunt vs Gulp vs Prepros vs Codekit?

    aemxdp
    @aemxdp
    Использую 'npm run'. Зачем все эти билд-системы, когда есть linux?
    Продемонстрирую на примере прикручивания jshint:
    grunt:
    module.exports = function(grunt) {  
      grunt.initConfig({
        jshint: {
          files: ['**.js'],
          options: JSON.parse(require('fs').readFileSync('./.jshinrc'))
        }
      });
      grunt.loadNpmTasks('grunt-contrib-jshint');
    };

    gulp:
    var jshint = require('gulp-jshint');  
    var gulp   = require('gulp');  
    gulp.task('jshint', function() {  
      return gulp.src('**.js')
        .pipe(jshint());
    });

    npm run (coffee syntax):
    "scripts":
      "jshint": "jshint **.js"

    Как говорится, write less - create more!
    См. также:
    blog.keithcirkel.co.uk/why-we-should-stop-using-grunt
    substack.net/task_automation_with_npm_run
    Ответ написан
    Комментировать