Commit Graph

82 Commits

Author SHA1 Message Date
Frederic Junod 6abecb0192 Remove check-requires script
The missingProvide and missingRequire compiler checks are already checking
if the goog.require and goog.provide are correct.
2016-05-02 09:29:42 +02:00
Frederic Junod 5b98066d16 Remove bin/check-whitespace.py 2016-01-18 16:50:16 +01:00
Frederic Junod 15ef7eec85 Remove pystache dependency
And use the mustache node module instead.
2015-08-26 10:36:55 +02:00
Éric Lemoine b4434725a5 Make check-whitespace.py exit 1 on whitespace errors 2015-04-29 09:12:13 +02:00
Éric Lemoine 507335ea69 Make check-requires.py exit 1 on missing/unused requires 2015-04-29 09:10:04 +02:00
Éric Lemoine 3fdd1f2135 Update bin/loader_hosted_examples.js 2015-04-26 20:42:02 +02:00
Éric Lemoine 4c2c21a5d6 Add Makefile 2015-04-26 20:20:59 +02:00
Tim Schaub a85de86ec2 Make build.py call tasks/build-examples.js 2015-04-12 17:11:05 -06:00
Stefan Weil e812f2435e Fix typos found by codespell
Most of them are in comments, some in strings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-02-12 16:39:55 +01:00
Éric Lemoine 96269c0b24 Change comment in loader_hosted_examples.js
The hosted examples do not use the ol-debug.js build. They use ol.js in "production" mode, and they load scripts one by one in "development" mode.
2014-08-19 12:14:38 +02:00
Tim Schaub 737e063937 Two ways to run the hosted examples: compiled and raw
When viewing the hosted examples, people can load the compiled version of the library or load each script individually.
2014-07-17 21:42:55 -06:00
Tim Schaub 4dc601f30d Generate a ol-debug.js script useful for debugging
Instead of running everything through the Compiler just to remove whitespace, we provide a build that is a simple concatenation of all scripts in dependency order.  This build (ol-debug.js) should never be used in production (the same applies to the old ol-whitespace.js build).  Instead, the intention is that it be used to aid in debugging during development.
2014-07-17 21:33:02 -06:00
Tim Schaub 28a23a11b5 Remove ol-simple.js build
We've proven that we can, but that doesn't mean we should be building with `SIMPLE_OPTIMIZATIONS`.
2014-07-17 21:31:58 -06:00
Éric Lemoine f18dbcdb97 Remove bin/closure
And use the depswriter.py script from Closure Library downloaded by closure-util.
2014-07-05 23:46:03 +02:00
Éric Lemoine 18d292edd7 Make check-example.js display console logs from page 2014-05-06 16:38:55 +02:00
Tim Schaub fe5d8712f2 Unused script 2014-04-29 09:53:06 -06:00
Tim Schaub 9e33672503 Unused externs and typedef generating code 2014-04-08 11:41:24 -06:00
Tom Payne 69addbca87 Merge pull request #1749 from twpayne/windows-newlines
Generate proper line endings on Windows
2014-02-25 22:26:54 +01:00
Tom Payne 55755871c2 Use write to avoid newline problems 2014-02-23 14:45:30 +01:00
Tom Payne 8e9d5fb0e9 Always write binary files in mode wb 2014-02-23 14:33:38 +01:00
Tom Payne 48b85316bb Always read binary files with mode rb 2014-02-23 14:33:38 +01:00
Tom Payne 3aedca7bd6 Always read line-by-line with mode rU 2014-02-23 13:50:54 +01:00
Tim Schaub e633f7f8c1 Don't inject stylesheets with JavaScript
This reverts 4d619d71b1 (see #1527), going back to what we had after e13075f6ff (see #881).

To avoid the 404 in the hosted examples, the css is copied to the same relative path when hosted as during development.
2014-02-21 18:45:46 -07:00
Éric Lemoine 89141eec11 Remove export_as handling from generate-exports.py 2013-12-18 08:25:14 +01:00
Tim Schaub b77a29f2f4 Remove handling of @exportFunction 2013-12-13 08:50:38 -07:00
Tim Schaub ad0212ea69 Remove handling of @exportClass 2013-12-13 08:47:47 -07:00
Éric Lemoine cf14d4e41d Add @typedefs to externs file 2013-12-12 15:06:05 +01:00
Tom Payne 3eded60938 Merge pull request #1118 from twpayne/build-examples-together
Build examples together
2013-10-15 03:48:34 -07:00
Tom Payne effc09edd6 Add script to combine examples 2013-10-10 16:44:34 +02:00
Éric Lemoine 036dee55a9 Revert "Always set CLOSURE_NO_DEPS to true"
This reverts commit aa5a571ab1.
2013-10-10 09:26:37 +02:00
Tom Payne 9c9a6ebff5 Add pyglslunit alternative to glsl-unit 2013-10-01 18:31:09 +02:00
Tim Schaub 4d71d2b1e8 Less greedy 2013-09-10 23:24:43 -06:00
Tim Schaub 15609f36ad Unused imports 2013-09-04 13:56:03 -06:00
Tim Schaub 2ac3d4d2cd Export namespaces instead of functions in generated code 2013-09-04 13:56:02 -06:00
Éric Lemoine a37f114e4b Add export annotation @exportFunction
This commit adds a new export annotation: @exportFunction. @exportFunction is to be used to declare functions that take an options object literal as their first arguments. @exportFunction is to regular functions as @exportClass is to constructors.

The usage of @exportFunction is as follows:

@exportFunction ol.control.defaults ol.control.DefaultsOptions ol.Collection

Note: the Function#export method uses a recursive function. This is to handle nested options.
2013-08-19 14:01:57 +02:00
Éric Lemoine 8d09be7134 No reference to internal types in externs file
Currently we have things like like in the generated externs file (types.js):

/**
 * @type {ol.control.AttributionOptions|undefined}
 */
olx.control.DefaultsOptionsExtern.prototype.attributionOptions;

It doesn't make sense to have external object properties whose types are
internal (ol.control.AttributionOptions in the above example).

With this commit, the generate-exports.py script generates this:

/**
 * @type {olx.control.AttributionOptionsExtern|undefined}
 */
olx.control.DefaultsOptionsExtern.prototype.attributionOptions;
2013-08-19 13:54:26 +02:00
Éric Lemoine e17d6aef70 Preserve unexpected items in options object passed to the constructor 2013-07-12 17:47:09 +02:00
Éric Lemoine ca332a3fef Minor fix to the generate-exports.py script
Now that we correctly export the ol.animation.*, ol.easing.* and ol.coordinate.* symbols we can make the generate-exports.py script work for more cases.
2013-05-09 22:46:08 +02:00
Éric Lemoine aa5a571ab1 Always set CLOSURE_NO_DEPS to true 2013-04-30 09:25:09 +02:00
Tom Payne baf8cc49a1 Avoid generating long lines in exports 2013-04-23 15:29:17 +02:00
Tom Payne 1d5431226e Use objectliterals.jsdoc instead of objectliterals.exports 2013-04-07 18:00:11 +02:00
Tom Payne 4d1ec1ff90 Remove (mostly unused) logger 2013-04-06 17:32:41 +02:00
Tom Payne 8073be7f3a Update examples URL to openlayers.github.io 2013-04-06 14:21:16 +02:00
Éric Lemoine b87fcbb4c4 Move hosted examples loader our of build dir
The build dir is now empty, and therefore unexisting for Git.
2013-03-29 16:17:38 +01:00
Éric Lemoine 0ae47403ee Merge pull request #398 from elemoine/nestedoptions
Support nested options objects
2013-03-20 10:45:37 -07:00
Éric Lemoine 0b403c767a Fix goog.provide for object literals 2013-03-20 18:43:02 +01:00
Éric Lemoine 02d8d9e0bc Support nested options objects
This commit extends the generated Export constructors to support nested options objects. For example, this is now supported:

@exportObjectLiteralProperty ol.MapOptions.view ol.View|ol.View2DOptions|undefined

This specifies that the "view" property in the map options can reference an ol.View instance, an ol.View2DOptions literal object, or undefined. If the "view" property references an ol.View2DOptions literal object the ol.MapExport constructor will create an ol.View2DExport instance, and pass it to the parent constructor, ol.Map. In this way, extern types never cross the external/internal boundary. In other words, translations from non-renamed to renamed objects remain confined to the generated Export constructors.
2013-03-20 18:43:02 +01:00
Tim Schaub 462659a9fc Use index.html instead of example-list.html
The original decision to avoid index.html was because it only works with a build step.  Since we've all accepted a build step, the more sensible name is index.html.  Without this change, every hosted example has a link to http://openlayers.github.com/ol3/master/examples/example-list.html which 404s.
2013-03-19 12:17:00 -06:00
Éric Lemoine 392735c823 Merge pull request #384 from elemoine/optional
Exports fixes
2013-03-15 14:26:05 -07:00
Éric Lemoine 1f641c5933 Make the generated Export classes accept undefined
We have constructors, like ol.View2D and ol.control.Attribution, whose "options" argument is optional (opt_options). But currently, we cannot do "new ol.View2D()" in uncompiled code that uses an ol3 build compiled in advanced mode. This commit fixes that by changing the generated Export constructors.
2013-03-15 18:01:53 +01:00