最有用的Gulp插件匯總

jopen 9年前發布 | 251K 次閱讀 項目構建 gulp

HTML&CSS

autoprefixer - parse CSS and add vendor prefixes to rules by Can I Use.

gulp-browser-sync - keep multiple browsers & devices in sync when building websites.

gulp-useref - parse build blocks in HTML files to replace references to non-optimized scripts or stylesheets.

gulp-email-design - a workflow for designing and testing HTML email templates.

gulp-uncss - remove unused CSS from your projects.

gulp-csso - very cool CSS minificator. In addition, there are many CSS optimizers and benchmark tests (GitHub) for them. But recently I saw most powerful Shorthand utility without Gulp, which does folowing:

a {
    font-family: Arial;
    font-style: italic;
    font-size: 14px;
    line-height: 18px;
    font-weight: bold;
    background-image: url('example.png');
    background-color: red;
    background-size: cover;
    background-repeat: no-repeat;
}

=>

a { font: italic bold 14px/18px Arial; background: red url('example.png') no-repeat / cover; }</pre>

gulp-htmlmin - neat HTML minificator.

gulp-csscomb - refines the structure of your CSS.

gulp-csslint - CSS linter.

gulp-htmlhint - HTML validator.

gulp-processhtml - Process html files at build time to modify them as you wish.

JavaScript

gulp-autopolyfiller - precise polyfills. This is like Autoprefixer, but for JavaScript polyfills.

gulp-babel - transpiler for writing next generation JavaScript.

gulp-jsfmt - for formatting, searching, and rewriting JavaScript.

gulp-jscs - for checking JavaScript Code Style.

gulp-modernizr - build out a lean, mean Modernizr machine.

gulp-express — start (and supervise) an Express.js web server using, works well with socket.io

gulp-requirejs and gulp-browserify - optimize the work with RequireJS and Browserify respectively.

gulp-plato - generate static analysis reports.

gulp-complexity - evaluates code maintainability using Halstead and Cyclomatic metrics.

fixmyjs - automatically fix silly lint errors with help of JSHint (gulp-jshint).

gulp-jscpd — copy/paste detector for programming source code.

gulp-buddy.js - magic number detection for javascript.

gulp-jsonlint - JSON validator.

gulp-uglify - JavaScript compressor.

gulp-concat - concatenate files.

Unit Tests

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!