Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Updates for DIT structure changes

Mike McGann04e796fd7f26
diff --git a/Gruntfile.js b/Gruntfile.js
index a94ab591f..98cc026e6 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -56,21 +56,16 @@ module.exports = function(grunt) {
]
},
- // Copies the web root from the source directory to the build
- // directory
- web: {
+ // Copies the source files to the build directory
+ source: {
files: [
{ expand: true, cwd: "src",
- src: "**", dest: "build/worldview-debug/web" }
- ]
- },
-
- // Copies the auxillary binary files and/or scripts from the
- // source directory to the build directory.
- bin: {
- files: [
+ src: ["**", "**/.htaccess"],
+ dest: "build/worldview-debug/web" },
{ expand: true, cwd: "bin",
- src: "**", dest: "build/worldview-debug/bin" }
+ src: "**", dest: "build/worldview-debug/bin" },
+ { expand: true, cwd: "conf",
+ src: "**", dest: "build/worldview-debug/conf" }
]
},
@@ -93,7 +88,7 @@ module.exports = function(grunt) {
release: {
files: [
{ expand: true, cwd: "build/worldview-debug",
- src: ["**"],
+ src: ["**", "**/.htaccess"],
dest: "build/worldview" },
{ expand: true, cwd: "build/worldview-debug/web",
src: [
@@ -489,8 +484,7 @@ module.exports = function(grunt) {
grunt.registerTask("build", [
"clean",
- "copy:web",
- "copy:bin",
+ "copy:source",
"copy:config",
"exec:act",
"exec:vrt",
diff --git a/package.json b/package.json
index 00feac86f..c35f7c81c 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
"grunt-contrib-compress": "0.5.x",
"grunt-contrib-copy": "0.4.x",
"grunt-contrib-cssmin": "0.7.x",
+ "grunt-contrib-jshint": "0.8.x",
"grunt-contrib-uglify": "0.2.x",
"grunt-contrib-yuidoc": "0.4.x",
"grunt-exec": "0.4.x",
diff --git a/src/.htaccess b/src/.htaccess
index bf6a41327..090768416 100644
--- a/src/.htaccess
+++ b/src/.htaccess
@@ -1,21 +1,10 @@
-# Requires mod_expires to be enabled.
-<IfModule mod_expires.c>
- # Enable expirations.
- ExpiresActive On
+# Don't cache the index.html file
+ExpiresActive On
+<FilesMatch index.html>
+ ExpiresDefault A0
+ Header set Cache-Control "no-cache, no-store, must-revalidate"
+ Header set Pragma "no-cache"
+</FilesMatch>
+
- #Dont cache html files or php
- <FilesMatch \.(html|php|txt)$>
- ExpiresDefault A0
- </FilesMatch>
- #cache for one hour
- <FilesMatch \.(css|javascript|jsp)$>
- ExpiresDefault A3600
- </FilesMatch>
- #cache for one day
- <FilesMatch \.(jpg|png|gif|jpeg|icon|wav|mpeg|mp4|fla)$>
- ExpiresDefault A86400
- </FilesMatch>
-</IfModule>
-Header set Cache-Control "no-cache, no-store, must-revalidate"
-Header set Pragma "no-cache"
diff --git a/src/pages/.htaccess b/src/pages/.htaccess
new file mode 100644
index 000000000..924bd370a
--- /dev/null
+++ b/src/pages/.htaccess
@@ -0,0 +1,10 @@
+# Don't cache the index.html file
+ExpiresActive On
+<FilesMatch ".*\.html$">
+ ExpiresDefault A0
+ Header set Cache-Control "no-cache, no-store, must-revalidate"
+ Header set Pragma "no-cache"
+</FilesMatch>
+
+
+
diff --git a/src/js/link/.htaccess b/src/service/wv.link/.htaccess
similarity index 100%
rename from src/js/link/.htaccess
rename to src/service/wv.link/.htaccess