Commit Graph

23 Commits

Author SHA1 Message Date
Tim Schaub 9875df39bf Use https for openlayers.org 2016-10-16 00:16:15 -06:00
Andreas Hocevar 6f5ed17fc5 Remove goog.asserts.*
This pull requests replaces type check hint assertions with type casts,
library sanity check assertions with conditional console.assert statements
in debug mode, and runtime sanity checks with assertions that throw an
ol.AssertionError with an error code for lookup outside the library.
2016-08-04 11:29:54 +02:00
Tom Vincent 8548a6f898 chore(build): guard against unterminated scripts
If ol3 is included as part of a concatenated build and the script before it does
not end in a semi-colon, the IIFE is interpreted incorrectly (often resulting in
`TypeError: (intermediate value)`).
2016-07-22 13:47:25 +02:00
Andreas Hocevar 1d20215bfa Make all typedefs work without provide/require 2016-06-14 15:01:20 +00:00
Marc Jansen d3de8c38b5 Use fs-extra as fs 2016-03-31 10:30:58 +02:00
Tim Schaub 1b01efc08b Check for exports before define 2015-06-24 21:53:52 -06:00
Tim Schaub d4763a0fe7 Set CLOSURE_NO_DEPS globally 2014-12-20 02:35:05 -07:00
Tim Schaub a95327f18e Define goog and assign to global
When concatenating the Closure Library, base.js creates a new `goog` object if there is not already one in scope.  Later, `goog.global` is assigned the value of `this`.  Calls to `goog.provide` create "namespace" objects by assigning to `goog.global`.  To ensure that `goog` is the same as `goog.global.goog`, we need to create a new `goog` object in the scope of base.js and assign it to `this.goog`.
2014-12-19 14:41:47 -07:00
Tim Schaub b60b0ecdb0 Add support for wrapping the build in UMD syntax. 2014-12-13 13:23:10 -08:00
Tim Schaub 4785001548 Parse examples and build external modules on install 2014-10-23 15:57:10 -06:00
Éric Lemoine ff6da7ed79 New domain in the build header 2014-08-29 17:27:52 +02:00
Bart van den Eijnden a5dd13c5f1 Add a reference to the license to the build 2014-08-22 10:10:21 +02:00
Tim Schaub c3bddffecb Unconditionally add version info to the build header
This reworks the changes in #2442 so we always include the version info, regardless of whether the module is run as main or not.  This also addresses a few lint related issues.
2014-07-25 12:50:58 -06:00
tsauerwein 9102647751 Write version in builds 2014-07-25 16:10:08 +02:00
Tim Schaub a8a035468b Allow cwd to be configured for build
By default, all paths in the build config (e.g. externs) are assumed to be relative to the ol3 repo root.  To make it so relative paths are resolved from a different directory, use the cwd option.

In addition, this change makes it so the `build.js` task can be run from another directory.
2014-06-29 15:02:47 -04:00
Tim Schaub 250f6901d3 Pass around single config object 2014-05-21 13:22:32 +02:00
Andreas Hocevar cd4092f3e0 Allow to specify an objectToExportTo for goog.exportSymbol
This allows users to build ol3 without anything exposed in the
global namespace. This can e.g. be useful for creating an ol3
AMD module, by simply using a build configuration with
"define('ol',function(){var o={};%output%return o.ol;});" as
"output_wrapper".
2014-05-20 21:49:26 +02:00
Tim Schaub c3184f2cce Support for debug builds (concatenation only)
Whitespace builds are still painful to debug.  Skipping the compiler altogether and simply concatenating sources is a better option for development and debugging.  By ommitting the `compile` option in a build config, the output is "uncompiled" - a straight concatenation of all sources in dependency order.
2014-05-14 10:39:51 -06:00
Tim Schaub fd170eb295 Accept a path for exports file 2014-04-29 09:57:19 -06:00
Tim Schaub 3dd5fb88e5 Allow configuration of JVM arguments in build 2014-04-29 09:53:07 -06:00
Tim Schaub 758eed357e Accept a src config, add docs 2014-04-29 09:53:06 -06:00
Tim Schaub a28db38eef Parse options and add docs 2014-04-29 09:53:06 -06:00
Tim Schaub b6277e0a01 Build task for driving the compiler 2014-04-29 09:53:06 -06:00