https://github.com/duzun/gulp-gccs
Gulp plugin to compile JS files using Google Closure Compiler Service
https://github.com/duzun/gulp-gccs
Last synced: 3 months ago
JSON representation
Gulp plugin to compile JS files using Google Closure Compiler Service
- Host: GitHub
- URL: https://github.com/duzun/gulp-gccs
- Owner: duzun
- License: mit
- Created: 2018-08-10T17:07:21.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T22:38:04.000Z (almost 3 years ago)
- Last Synced: 2025-06-06T08:38:49.677Z (4 months ago)
- Language: JavaScript
- Homepage: https://closure-compiler.appspot.com/home
- Size: 526 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-gccs [](https://travis-ci.com/duzun/gulp-gccs) [](https://badge.fury.io/js/gulp-gccs)
Gulp plugin to compile JS files using Google Closure Compiler Service.
## Install
Install via [npm](https://www.npmjs.com/package/gulp-gccs)
```sh
npm i -D gulp-gccs
```## Usage
Here is an example that should get you started with gulp@4:
```js
const gulp = require('gulp');
const gccs = require('gulp-gccs');
const rename = require('gulp-rename');gulp.task('es5', function() {
return gulp.src('src/*.js', { base: 'src/' })
.pipe(gccs({
compilation_level: 'WHITESPACE_ONLY',
formatting: 'pretty_print',
}))
.pipe(gulp.dest('dist/'))
;
});gulp.task('min', function() {
return gulp.src(['dist/*.js', '!dist/*.min.js'], { base: 'dist/' })
.pipe(gccs())
.pipe(rename({extname: '.min.js'}))
.pipe(gulp.dest('dist/'))
;
});gulp.task('default', gulp.series('es5', 'min'));
```