Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Remove 3rd party modules from Worldview minification and add job for custom openlayers minification

Taylor Gunnoeb12c8cdc7026
diff --git a/Gruntfile.js b/Gruntfile.js
index ae08464a2..62623958d 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -79,8 +79,13 @@ module.exports = function(grunt) {
// Combine all the Worldview JavaScript files into one file.
js: {
src: js["wv.js"],
- dest: "build/worldview-debug/web/js/wv.js",
+ dest: "build/worldview-debug/web/js/wv.js"
},
+ // Combine all the Openlayers JavaScript files into one file.
+ oljs: {
+ src: js["ol.js"],
+ dest: "build/worldview-debug/web/js/ol.js"
+ },
// Combine all the Worldview CSS files into one file.
css: {
src: css,
@@ -154,11 +159,17 @@ module.exports = function(grunt) {
overwrite: true,
src: [
"node_modules/babel-polyfill/dist/polyfill.js",
+ "node_modules/babel-polyfill/dist/polyfill.min.js",
"node_modules/react/dist/react.js",
+ "node_modules/react/dist/react.min.js",
"node_modules/react-dom/dist/react-dom.js",
+ "node_modules/react-dom/dist/react-dom.min.js",
"node_modules/worldview-components/browser/wvc.js",
+ "node_modules/worldview-components/browser/wvc.min.js",
"node_modules/lodash/lodash.js",
+ "node_modules/lodash/lodash.min.js",
"node_modules/bluebird/js/browser/bluebird.js",
+ "node_modules/bluebird/js/browser/bluebird.min.js",
"node_modules/promise-queue/lib/index.js",
"node_modules/openlayers/dist/ol-debug.js"
],
@@ -415,6 +426,7 @@ module.exports = function(grunt) {
"build/worldview-debug/web/**/*.js",
"!build/worldview-debug/web/css/wv.css",
"!build/worldview-debug/web/js/wv.js",
+ "!build/worldview-debug/web/js/ol.js",
"!build/worldview-debug/web/css/bulkDownload.css",
"!build/worldview-debug/web/ext/**/*"
],
@@ -555,8 +567,8 @@ module.exports = function(grunt) {
options: {
banner: banner,
compress: {
- drop_console: true,
- drop_debugger: true,
+ //drop_console: true,
+ //drop_debugger: true,
unused: true
}
},
@@ -567,7 +579,14 @@ module.exports = function(grunt) {
"build/worldview/web/js/wv.js"
]
}
- }
+ },
+ ol_js: {
+ files: {
+ "build/worldview/web/js/ol.js": [
+ "build/worldview/web/js/ol.js"
+ ]
+ }
+ }
},
});
diff --git a/deploy/wv.js.json b/deploy/wv.js.json
index 8d1456645..87cc9bd76 100644
--- a/deploy/wv.js.json
+++ b/deploy/wv.js.json
@@ -1,15 +1,7 @@
{
"wv.js": [
- "node_modules/babel-polyfill/dist/polyfill.js",
- "node_modules/openlayers/dist/ol-debug.js",
- "node_modules/react/dist/react.js",
- "node_modules/react-dom/dist/react-dom.js",
- "node_modules/lodash/lodash.js",
- "node_modules/bluebird/js/browser/bluebird.js",
- "node_modules/promise-queue/lib/index.js",
- "node_modules/worldview-components/browser/wvc.js",
- "web/js/ol.wv/ol.wv.lookupimagetile.js",
+ "node_modules/promise-queue/lib/index.js",
"web/js/edsc.js",
"web/js/edsc/coordinate.js",
@@ -97,5 +89,9 @@
"web/js/wv.tour.js",
"web/js/wv.debug.js",
"web/js/wv.main.js"
+ ],
+ "ol.js": [
+ "node_modules/openlayers/dist/ol-debug.js",
+ "web/js/ol.wv/ol.wv.lookupimagetile.js"
]
}
diff --git a/web/index.html b/web/index.html
index eb8f1fb17..c65a906ff 100644
--- a/web/index.html
+++ b/web/index.html
@@ -98,13 +98,27 @@
<!-- External libraries =============================================== -->
<!-- link.dev --> <script type="text/javascript" src="ext/node_modules/babel-polyfill/dist/polyfill.js"></script>
+ <!-- link.prod --> <!-- <script type="text/javascript" src="ext/node_modules/babel-polyfill/dist/polyfill.min.js"></script> -->
<!-- link.dev --> <script type="text/javascript" src="ext/node_modules/react/dist/react.js"></script>
+ <!-- link.prod --> <!-- <script type="text/javascript" src="ext/node_modules/react/dist/react.min.js"></script> -->
+
<!-- link.dev --> <script type="text/javascript" src="ext/node_modules/react-dom/dist/react-dom.js"></script>
+ <!-- link.prod --> <!-- <script type="text/javascript" src="ext/node_modules/react-dom/dist/react-dom.min.js"></script> -->
+
<!-- link.dev --> <script type="text/javascript" src="ext/node_modules/worldview-components/browser/wvc.js"></script>
+ <!-- link.prod --> <!-- <script type="text/javascript" src="ext/node_modules/worldview-components/browser/wvc.min.js"></script> -->
+
<!-- link.dev --> <script type="text/javascript" src="ext/node_modules/lodash/lodash.js"></script>
+ <!-- link.prod --> <!-- <script type="text/javascript" src="ext/node_modules/lodash/lodash.min.js"></script> -->
+
<!-- link.dev --> <script type="text/javascript" src="ext/node_modules/bluebird/js/browser/bluebird.js"></script>
+ <!-- link.prod --> <!-- <script type="text/javascript" src="ext/node_modules/bluebird/js/browser/bluebird.min.js"></script> -->
+
<!-- link.dev --> <script type="text/javascript" src="ext/node_modules/promise-queue/lib/index.js"></script>
+
<!-- link.dev --> <script type="text/javascript" src="ext/node_modules/openlayers/dist/ol-debug.js"></script>
+ <!-- link.dev --> <script type="text/javascript" src="js/ol.wv/ol.wv.lookupimagetile.js"></script>
+ <!-- link.prod --> <!-- <script type="text/javascript" src="js/ol.js"></script> -->
<!-- link.dev --> <script type="text/javascript" src="ext/anim/gifshot/gifshot.js"></script>
<!-- link.prod --> <!-- <script type="text/javascript" src="ext/anim/gifshot/gifshot.min.js"></script> -->
@@ -157,8 +171,6 @@
<!-- link.prod --> <!-- <script type="text/javascript" src="js/wv.js?v=20131218215115174&mobile"></script> -->
- <!-- link.dev --> <script type="text/javascript" src="js/ol.wv/ol.wv.lookupimagetile.js"></script>
-
<!-- link.dev --> <script type="text/javascript" src="js/edsc.js"></script>
<!-- link.dev --> <script type="text/javascript" src="js/edsc/coordinate.js"></script>
<!-- link.dev --> <script type="text/javascript" src="js/edsc/arc.js"></script>