Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Commit c1aed9f

Browse files
Minor documentation corrections
1 parent 925c0ea commit c1aed9f

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

packages/google-closure-compiler/docs/grunt.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Task targets, files and options may be specified according to the grunt
66
Include the plugin in your Gruntfile.js:
77

88
```js
9-
import {grunt as gruntPlugin} from 'google-closure-compiler';
9+
import {CONTRIB_PATH, grunt as gruntPlugin} from 'google-closure-compiler';
1010

1111
gruntPlugin(grunt, {
1212
platform: ['native', 'java'],
@@ -39,6 +39,8 @@ grunt.initConfig({
3939
'dest/output.min.js': ['src/js/**/*.js']
4040
},
4141
options: {
42+
js: '/node_modules/google-closure-library/**.js',
43+
externs: `${CONTRIB_PATH}/externs/jquery-1.9.js`,
4244
compilation_level: 'SIMPLE',
4345
language_in: 'ECMASCRIPT5_STRICT',
4446
create_source_map: 'dest/output.min.js.map',

packages/google-closure-compiler/docs/gulp.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,19 @@ be allocated. Both the grunt and gulp plugins support this.
8888
```js
8989
import {gulp as closureCompiler} from 'google-closure-compiler';
9090

91-
closureCompiler({
92-
extraArguments: ['-Xms2048m']
91+
gulp.task('js-compile', function () {
92+
return gulp.src('./src/js/**/*.js', {base: './'})
93+
.pipe(closureCompiler({
94+
compilation_level: 'SIMPLE',
95+
warning_level: 'VERBOSE',
96+
language_in: 'ECMASCRIPT6_STRICT',
97+
language_out: 'ECMASCRIPT5_STRICT',
98+
output_wrapper: '(function(){\n%output%\n}).call(this)',
99+
js_output_file: 'output.min.js'
100+
}, {
101+
extraArguments: ['-Xms2048m']
102+
}))
103+
.pipe(gulp.dest('./dist/js'));
93104
});
105+
94106
```

0 commit comments

Comments
 (0)