Skip to content

Commit ebda2f1

Browse files
Closure Teamcopybara-github
Closure Team
authored andcommitted
Add lib/base.js to remove the implicit Closure Library base.js dependency
PiperOrigin-RevId: 620884758
1 parent fdd6a2b commit ebda2f1

File tree

2 files changed

+1035
-3
lines changed

2 files changed

+1035
-3
lines changed

README.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,25 @@ The Closure Compiler will concatenate the files in the order they're passed at
199199
the command line.
200200

201201
If you're using globs or many files, you may start to run into problems with
202-
managing dependencies between scripts. In this case, you should use the
203-
[Closure Library](https://developers.google.com/closure/library/). It contains
204-
functions for enforcing dependencies between scripts, and Closure Compiler will
202+
managing dependencies between scripts. In this case, you should either use the
203+
included [lib/base.js](lib/base.js) that provides functions for enforcing
204+
dependencies between scripts (namely `goog.module` and `goog.require`) or
205+
[JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)
206+
(using the ECMAScript `import` and `export` syntax). Closure Compiler will
205207
re-order the inputs automatically.
206208

209+
## Closure JavaScript Library
210+
211+
The Closure Compiler releases with [lib/base.js](lib/base.js) that provides
212+
JavaScript functions and variables that serve as primitives enabling certain
213+
features of the Closure Compiler. This file is a derivative of the
214+
[identically named base.js](https://github.com/google/closure-library/blob/7818ff7dc0b53555a7fb3c3427e6761e88bde3a2/closure/goog/base.js)
215+
in the
216+
[soon-to-be deprecated](https://github.com/google/closure-library/issues/1214)
217+
Closure Library. This `base.js` will be supported by Closure Compiler going
218+
forward and may receive new features. It was designed to only retain its
219+
perceived core parts.
220+
207221
## Getting Help
208222

209223
1. Post in the

0 commit comments

Comments
 (0)