Compare commits

...

6 Commits

Author SHA1 Message Date
ahocevar
59c3eedbab Updates for v5.0.2 2018-07-05 00:04:32 +02:00
Andreas Hocevar
49050063d5 Merge pull request #8343 from tschaub/starter-project
Starter projects
2018-07-04 23:53:48 +02:00
ahocevar
11024ad294 Update package version to 5.0.1 2018-07-04 22:02:38 +02:00
ahocevar
73f1428701 Changelog for v5.0.1 2018-07-04 21:52:27 +02:00
Andreas Hocevar
a579b168f7 Merge pull request #8341 from ahocevar/side-effects
Set sideEffects: false flag
2018-07-04 21:46:51 +02:00
Andreas Hocevar
537a21fd48 Merge pull request #8342 from ahocevar/quickstart-links
Fix links and description in quickstart tutorial
2018-07-04 21:46:29 +02:00
7 changed files with 29 additions and 14 deletions

8
changelog/v5.0.1.md Normal file
View File

@@ -0,0 +1,8 @@
# 5.0.1
The v5.0.1 release helps reduce bundle sizes for bundlers that support the `"sideEffects": "false"`option in `package.json`, and fixes website documentation regarding cdn locations and debug build which has been replaced by source maps.
## Fixes
* [#8341](https://github.com/openlayers/openlayers/pull/8341) - Set sideEffects: false flag ([@ahocevar](https://github.com/ahocevar))
* [#8342](https://github.com/openlayers/openlayers/pull/8342) - Fix links and description in quickstart tutorial ([@ahocevar](https://github.com/ahocevar))

7
changelog/v5.0.2.md Normal file
View File

@@ -0,0 +1,7 @@
# 5.0.2
The v5.0.1 release updates the package readme with new example projects.
## Fixes
* [#8332](https://github.com/openlayers/openlayers/pull/8343) - Starter projects ([@tschaub](https://github.com/tschaub))

View File

@@ -7,6 +7,9 @@ layout: doc.hbs
This primer shows you how to put a simple map on a web page. This primer shows you how to put a simple map on a web page.
**For production, we strongly recommend bundling the application together with its dependencies, as explained in the [Building an OpenLayers Application](./tutorials/bundle.html) tutorial.**
## Put a map on a page ## Put a map on a page
Below you'll find a complete working example. Create a new file, copy in the contents below, and open in a browser: Below you'll find a complete working example. Create a new file, copy in the contents below, and open in a browser:
@@ -15,14 +18,14 @@ Below you'll find a complete working example. Create a new file, copy in the co
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<link rel="stylesheet" href="https://openlayers.org/en/{{ latest }}/css/ol.css" type="text/css"> <link rel="stylesheet" href="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/{{ latest }}/css/ol.css" type="text/css">
<style> <style>
.map { .map {
height: 400px; height: 400px;
width: 100%; width: 100%;
} }
</style> </style>
<script src="https://openlayers.org/en/{{ latest }}/build/ol.js" type="text/javascript"></script> <script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/{{ latest }}/build/ol.js"></script>
<title>OpenLayers example</title> <title>OpenLayers example</title>
</head> </head>
<body> <body>
@@ -56,10 +59,8 @@ To include a map a web page you will need 3 things:
### Include OpenLayers ### Include OpenLayers
**Caveat:** In production, it is not recommended to include dependencies as script tag. Instead, we recommend bundling the application together with its dependencies, as explained in the [Building an OpenLayers Application](./tutorials/bundle.html) tutorial.
```xml ```xml
<script src="https://openlayers.org/en/{{ latest }}/build/ol.js" type="text/javascript"></script> <script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/{{ latest }}/build/ol.js"></script>
``` ```
The first part is to include the JavaScript library. For the purpose of this tutorial, here we simply point to the openlayers.org website to get the whole library. In a production environment, we would build a custom version of the library including only the module needed for our application. The first part is to include the JavaScript library. For the purpose of this tutorial, here we simply point to the openlayers.org website to get the whole library. In a production environment, we would build a custom version of the library including only the module needed for our application.

View File

@@ -1,6 +1,6 @@
{ {
"name": "openlayers", "name": "openlayers",
"version": "5.0.0", "version": "5.0.2",
"description": "OpenLayers mapping library", "description": "OpenLayers mapping library",
"keywords": [ "keywords": [
"map", "map",

View File

@@ -34,11 +34,9 @@ new Map({
See the following examples for more detail on bundling OpenLayers with your application: See the following examples for more detail on bundling OpenLayers with your application:
* Using [Rollup & Uglify](https://gist.github.com/tschaub/8beb328ea72b36446fc2198d008287de) * Using [Rollup](https://github.com/openlayers/ol-rollup)
* Using [Rollup & Closure Compiler](https://gist.github.com/tschaub/32a5692bedac5254da24fa3b12072f35) * Using [Webpack](https://github.com/openlayers/ol-webpack)
* Using [Webpack & Uglify](https://gist.github.com/tschaub/79025aef325cd2837364400a105405b8) * Using [Parcel](https://github.com/openlayers/ol-parcel)
* Using [Webpack & Closure Compiler](https://gist.github.com/ahocevar/8ceafc6293455ba491dd9be12c15761f)
* Using [Browserify & Uglify](https://gist.github.com/tschaub/4bfb209a8f809823f1495b2e4436018e)
## Module Identifiers ## Module Identifiers

View File

@@ -1,6 +1,6 @@
{ {
"name": "ol", "name": "ol",
"version": "5.0.0", "version": "5.0.2",
"description": "OpenLayers mapping library", "description": "OpenLayers mapping library",
"main": "index.js", "main": "index.js",
"module": "index.js", "module": "index.js",
@@ -9,5 +9,6 @@
"pbf": "3.1.0", "pbf": "3.1.0",
"pixelworks": "1.1.0", "pixelworks": "1.1.0",
"rbush": "2.0.2" "rbush": "2.0.2"
} },
"sideEffects": "false"
} }

View File

@@ -52,4 +52,4 @@ export function getUid(obj) {
* OpenLayers version. * OpenLayers version.
* @type {string} * @type {string}
*/ */
export const VERSION = '5.0.0'; export const VERSION = '5.0.2';