Skip to content

Commit

Permalink
Fix ogc/filter
Browse files Browse the repository at this point in the history
This only compiles if there is goog.provide('ol.Extent') in the typedefs file, and goog.require('ol.Extent') in this file. An alternative is to add an assert statement, but this means an extra dependency.

With this change there is no longer a need for the change to tasks/build.js
  • Loading branch information
probins committed May 11, 2016
1 parent 535e8f5 commit ed34caa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/ol/format/ogc/filter.js
Expand Up @@ -18,6 +18,7 @@ goog.provide('ol.format.ogc.filter.IsNull');
goog.provide('ol.format.ogc.filter.IsBetween');
goog.provide('ol.format.ogc.filter.IsLike');

goog.require('ol.Extent');
goog.require('ol.Object');


Expand Down
1 change: 1 addition & 0 deletions src/ol/typedefs.js
Expand Up @@ -2,6 +2,7 @@
* File for all top-level (in the `ol` namespace) typedefs used by the compiler,
* and referenced by JSDoc.
*/
goog.provide('ol.Extent');


/**
Expand Down
3 changes: 0 additions & 3 deletions tasks/build.js
Expand Up @@ -207,9 +207,6 @@ function build(config, paths, callback) {
} else {
log.info('ol', 'Compiling ' + paths.length + ' sources');
options.compile.js = paths.concat(options.compile.js || []);
// typedefs file has no `goog.provide`s, so is ignored by closure-util
// when calculating dependencies. So it's added here as a compiler option.
options.compile.js.push('src/ol/typedefs.js');
closure.compile(options, callback);
}
}
Expand Down

0 comments on commit ed34caa

Please sign in to comment.