Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Initial brand test

Mike McGannd5b675d95982
diff --git a/.gitignore b/.gitignore
index a39f4e723..8a3da1f44 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,5 +11,5 @@ doc
tools
*~
*.swp
-conf/web/eosdis
+conf/web/brand
options.json
diff --git a/Gruntfile.js b/Gruntfile.js
index 6ff9de9d3..a7ce1eedd 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -32,50 +32,39 @@ module.exports = function(grunt) {
// CSS files
var banner = grunt.file.read("etc/deploy/banner.txt");
- // Build options
- var pkg = grunt.file.readJSON("package.json");
- var options = {};
+ // Branding and build options
+ var opt = {};
+
if ( fs.existsSync("options.json") ) {
- options = grunt.file.readJSON("options.json");
- }
- options.officialName = options.officialName || "EOSDIS Worldview (Alpha)";
- options.longName = options.longName || "EOSDIS Worldview";
- options.shortName = options.shortName || "Worldview";
-
- options.email = options.email || "[email protected]";
- options.webmasters = options.webmasters || "";
-
- var bitly = fs.existsSync("conf/bitly_config.py");
- var eosdis = fs.existsSync("conf/web/eosdis");
- var gibsOps = !process.env.GIBS_HOST;
- var official = bitly && eosdis && gibsOps &&
- options.email === "[email protected]";
-
- console.log();
- console.log("============================================================");
- console.log("[" + pkg.name + "] " + options.officialName + ", Version " +
- pkg.version + "-" + pkg.release);
- console.log("");
- console.log("Long name : " + options.officialName);
- console.log("Short name : " + options.shortName);
- console.log("GIBS public servers: " + gibsOps);
- console.log("bit.ly support : " + bitly);
- console.log("EOSDIS options : " + eosdis);
- console.log("Support email : " + options.email);
- console.log("Webmasters : " + options.webmasters);
-
-
- if ( !official ) {
- console.error();
- grunt.log.error("WARNING: This is NOT a standard configuration");
+ opt = grunt.file.readJSON("etc/brand/options.json");
+
+ var bitly = fs.existsSync("conf/bitly_config.py");
+ var eosdis = fs.existsSync("conf/web/eosdis");
+ var gibsOps = !process.env.GIBS_HOST;
+ var official = bitly && eosdis && gibsOps &&
+ opt.email === "[email protected]";
+
+ console.log();
+ console.log("============================================================");
+ console.log("[" + opt.packageName + "] " + opt.officialName +
+ ", Version " + opt.version + "-" + opt.release);
+ console.log("");
+ console.log("Long name : " + opt.officialName);
+ console.log("Short name : " + opt.shortName);
+ console.log("GIBS public servers: " + gibsOps);
+ console.log("bit.ly support : " + bitly);
+ console.log("EOSDIS options : " + eosdis);
+ console.log("Support email : " + opt.email);
+
+ if ( !official ) {
+ console.error();
+ grunt.log.error("WARNING: This is NOT a standard configuration");
+ }
+ console.log("============================================================");
+ console.log();
}
- console.log("============================================================");
- console.log();
-
grunt.initConfig({
- pkg: grunt.file.readJSON("package.json"),
-
"git-rev-parse": {
build: {
options: {
@@ -86,14 +75,21 @@ module.exports = function(grunt) {
},
copy: {
+ brand: {
+ files: [
+ { expand: true, cwd: "etc/brand",
+ src: ["**"], dest: "." }
+ ]
+ },
+
// Copies the source files to the build directory
source: {
files: [
{ expand: true, cwd: "src",
- src: ["**", "**/.htaccess"],
+ 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" }
]
diff --git a/etc/brand.worldview/conf/web/brand/scripts.json b/etc/brand.worldview/conf/web/brand/scripts.json
new file mode 100644
index 000000000..13e93cf53
--- /dev/null
+++ b/etc/brand.worldview/conf/web/brand/scripts.json
@@ -0,0 +1,5 @@
+{
+ "scripts": [
+ "https://earthdata.nasa.gov/sites/all/themes/earthdata/js/ntpagetag.js"
+ ]
+}
diff --git a/options.sample.json b/options.sample.json
deleted file mode 100644
index ff7d79c15..000000000
--- a/options.sample.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "officialName": "EOSDIS Worldview (Alpha)",
- "longName": "EOSDIS Worldview",
- "shortName": "Worldview",
- "email": "[email protected]",
- "webmasters": "[email protected]"
-}
diff --git a/package.json b/package.json
index bafd2b08a..119bc3ba8 100644
--- a/package.json
+++ b/package.json
@@ -1,13 +1,4 @@
{
- "name": "worldview",
- "version": "0.7.0",
- "release": "1",
- "author": "Worldview Team",
- "description": "Browse full-resolution, near real-time satellite imagery",
- "repository": {
- "type": "git",
- "url": "https://github.com/nasa-gibs/worldview.git"
- },
"devDependencies": {
"buster": "0.7.x",
"grunt": "0.4.x",