diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 09e661e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - "node" - - "iojs" - - "7" - - "6" - - "5" - - "4" -script: - npm test diff --git a/README.md b/README.md index 9758045..95ccaf9 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,20 @@ # [gulp](http://gulpjs.com)-strip-comments -[![Build Status](https://img.shields.io/travis/RnbWd/gulp-strip-comments.svg?style=flat-square)](https://travis-ci.org/RnbWd/gulp-strip-comments) [![Coverage Status](https://coveralls.io/repos/RnbWd/gulp-strip-comments/badge.svg?branch=master&service=github)](https://coveralls.io/github/RnbWd/gulp-strip-comments?branch=master) [![downloads](https://img.shields.io/npm/dt/gulp-strip-comments.svg?style=flat-square)](https://www.npmjs.com/package/gulp-strip-comments) -[![decomment](https://img.shields.io/badge/decomment-v0.9.0-blue.svg?style=flat-square)](https://github.com/vitaly-t/decomment) -[![David](https://david-dm.org/rnbwd/gulp-strip-comments.svg?style=flat-square)](https://david-dm.org/rnbwd/gulp-strip-comments) +[![decomment](https://img.shields.io/badge/decomment-v0.9.5-blue.svg?style=flat-square)](https://github.com/vitaly-t/decomment) > [decomment](https://github.com/vitaly-t/decomment) - removes comments from JSON, JavaScript, CSS, HTML, etc. [![NPM](https://nodei.co/npm/gulp-strip-comments.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/gulp-strip-comments/) - ## Features -* Removes both single and multi-line comments from JSON, JavaScript and CSS/Text -* Automatically recognizes HTML and removes all `` from it -* Does not change layout / formatting of the original document -* Removes lines that have only comments on them -* Compatible with CSS3, JSON5 and ECMAScript 6 +- Removes both single and multi-line comments from JSON, JavaScript and CSS/Text +- Automatically recognizes HTML and removes all `` from it +- Does not change layout / formatting of the original document +- Removes lines that have only comments on them +- Compatible with CSS3, JSON5 and ECMAScript 6 The library does not support mixed content - HTML with JavaScript or CSS in it. Once the input code is recognized as HTML, only the HTML comments will be removed from it. @@ -29,7 +26,6 @@ For JSON and JavaScript this library uses [esprima] to guarantee correct process As an example, it can process [AngularJS 1.5 Core](https://code.angularjs.org/1.5.0/angular.js) in under 100ms, which is 1.1MB ~ 30,000 lines of JavaScript. - ## Install ```sh @@ -39,13 +35,11 @@ $ npm install --save-dev gulp-strip-comments ## Usage ```js -var gulp = require('gulp'); -var strip = require('gulp-strip-comments'); +var gulp = require("gulp"); +var strip = require("gulp-strip-comments"); -gulp.task('default', function () { - return gulp.src('template.js') - .pipe(strip()) - .pipe(gulp.dest('dist')); +gulp.task("default", function () { + return gulp.src("template.js").pipe(strip()).pipe(gulp.dest("dist")); }); ``` @@ -70,10 +64,10 @@ If [esprima] fails to validate the code, it will throw a parsing error. When suc ##### options.safe ⇒ Boolean -* `false (default)` - remove all multi-line comments -* `true` - keep special multi-line comments that begin with: - - `