Make tutorials use new bundle setup
MODIFY
package.json
package.json
"website": "cd website && npx hexo server",
"setup-website": "cd website && npm install",
"build-website": "npm run build && cp -a dist/built/. website/source/built && npm run build-website-examples && npm run build-website-tutorials && npm run docs && cd dist && find data \\( -name tiles -o -name base-images -o -name '*-hash-stamp' -o -name '*.tgz' \\) -prune -o \\( -print0 \\) | cpio -pmdL0 ../website/source && cp -ar apidocs/. ../website/source/apidocs && cd ../website && npm install && rm -f db.json && npx hexo generate",
- "prepublishOnly": "webpack --config webpack.config.js && webpack --config external.config.js && cp dist/built/*.js ."
+ "prepublishOnly": "webpack --config webpack.config.js && webpack --config webpack-lean.config.js && cp dist/built/*.js ."
},
"keywords": [
"map",

MODIFY
tutorials/basic/index.pug
tutorials/basic/index.pug
@@ -9,7 +9,6 @@ block mainTutorial
<!DOCTYPE html>
<html>
<head>
- <script type="text/javascript" src="../../built/geo.ext.min.js"></script>
<script type="text/javascript" src="../../built/geo.min.js"></script>
</head>
<body>
@@ -18,10 +17,6 @@ block mainTutorial
</html>
:markdown-it
- The second script, ``geo.ext.min.js``, is optional. It adds support
- for svg elements and touch interaction. It needs to be added before
- ``geo.min.js``.
-
Some CSS will make our map fill the page:
+codeblock('css', 2).

MODIFY
tutorials/common/tutorials.js
tutorials/common/tutorials.js
@@ -15,7 +15,6 @@ var processBlockInfo = {
/* We could also load from the CDN:
* https://cdnjs.cloudflare.com/ajax/libs/geojs/0.12.2/geo.min.js
* or the non-minified versions to make debug easier. */
- ' <script type="text/javascript" src="../../built/geo.ext.min.js"></script>\n' +
' <script type="text/javascript" src="../../built/geo.min.js"></script>\n' +
'</head>\n' +
'<body>\n' +

MODIFY
tutorials/editor3/index.pug
tutorials/editor3/index.pug
@@ -13,12 +13,10 @@ block mainTutorial
<!DOCTYPE html>
<html>
<head>
- <script type="text/javascript" src="../../built/geo.ext.min.js"></script>
<script type="text/javascript" src="../../built/geo.min.js"></script>
<!-- Use a specific version of GeoJS by requesting it from a CDN.
For instance, remove the local references, above, and
uncomment the following:
- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/geojs/0.15.1/geo.ext.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/geojs/0.15.1/geo.min.js"></script>
-->
</head>

MODIFY
tutorials/video_transport/index.pug
tutorials/video_transport/index.pug
@@ -11,7 +11,6 @@ block mainTutorial
<!DOCTYPE html>
<html>
<head>
- <script type="text/javascript" src="../../built/geo.ext.min.js"></script>
<script type="text/javascript" src="../../built/geo.min.js"></script>
</head>
<body>

MODIFY
webpack-tutorials.config.js
webpack-tutorials.config.js
@@ -3,7 +3,6 @@ const StringReplacePlugin = require('string-replace-webpack-plugin');
var path = require('path');
var base = require('./webpack.config');
-var external = require('./external.config');
var rules = base.module.rules.concat([{
test: /\.pug$/,
@@ -33,8 +32,6 @@ var rules = base.module.rules.concat([{
})
}]);
-rules = rules.concat(external.module.rules);
-
var plugins = base.plugins;
plugins.push(new StringReplacePlugin());

Make tutorials use new bundle setup