Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Updated README with additional information about Grunt, chagned package name from worldview-latest to worldview-master

Mike McGannd2490a68ccdb
diff --git a/Gruntfile.js b/Gruntfile.js
index 235223e75..040c6af23 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -216,6 +216,26 @@ module.exports = function(grunt) {
"worldview"
},
+ // Create a tarball of the documentation with a version number and
+ // git revision
+ tar_doc_versioned: {
+ command: "tar cjCf build dist/" +
+ "<%= pkg.name %>" +
+ "-doc" +
+ "-<%= pkg.version %>" +
+ "-<%= pkg.release %>" +
+ buildNumber +
+ ".git<%= grunt.config.get('git-revision') %>" +
+ ".tar.bz2 worldview-doc"
+ },
+
+ // Create a tarball of the documentation without versioning
+ // information
+ tar_doc: {
+ command: "tar cjCf build dist/worldview-doc.tar.bz2 " +
+ "worldview-doc"
+ },
+
// Builds the RPM
rpmbuild: {
command: 'rpmbuild --define "_topdir $PWD/build/rpmbuild" ' +
@@ -359,7 +379,7 @@ module.exports = function(grunt) {
url: "https://earthdata.nasa.gov/worldview",
options: {
paths: ["src/js"],
- outdir: "build/doc"
+ outdir: "build/worldview-doc"
}
}
},
@@ -373,9 +393,12 @@ module.exports = function(grunt) {
},
csslint: {
- main: [
- "src/css/wv.*.css"
- ]
+ main: {
+ options: {
+ ids: false
+ },
+ src: ["src/css/wv.*.css"]
+ }
},
buster: {
@@ -459,7 +482,9 @@ module.exports = function(grunt) {
"exec:tar_debug_versioned",
"exec:tar_debug",
"exec:tar_release_versioned",
- "exec:tar_release"
+ "exec:tar_release",
+ "exec:tar_doc_versioned",
+ "exec:tar_doc"
]);
grunt.registerTask("rpm_only", [
@@ -472,7 +497,7 @@ module.exports = function(grunt) {
]);
grunt.registerTask("doc", ["yuidoc"]);
- grunt.registerTask("lint", ["jshint"]);
+ grunt.registerTask("lint", ["csslint", "jshint"]);
grunt.registerTask("test", ["buster"]);
grunt.registerTask("rpm", ["build", "rpm_only"]);
grunt.registerTask("clean", "remove:build");
diff --git a/README.md b/README.md
index 0b9e67fa0..c9eb2b165 100644
--- a/README.md
+++ b/README.md
@@ -91,19 +91,22 @@ Create symlinks in ``/Library/WebServer/Documents`` to the appropriate
locations in the source tree. Replace ``$WORLDVIEW_HOME`` with the location of
the Worldview repository. In this example, the actual source files will mapped
to ``worldview`` while the production build will be mapped to
-``worldview-prod``:
+``worldview-release``:
sudo ln -s $WORLDVIEW_HOME/src /Library/WebServer/Documents/worldview
- sudo ln -s $WORLDVIEW_HOME/build/worldview/web /Library/WebServer/Documents/worldview-prod
+ sudo ln -s $WORLDVIEW_HOME/build/worldview/web /Library/WebServer/Documents/worldview-release
sudo ln -s $WORLDVIEW_HOME/build/worldview-debug/web /Library/WebServer/Documents/worldview-debug
+ sudo ln -s $WORLDVIEW_HOME/build/worldview-doc /Library/WebServer/Documents/worldview-doc
-Now edit ``/etc/apache2/httpd.conf`` and make the following changes:
+``.htaccess`` files are sprinked in the code base to assist with development.
+Create an apache configuration file replacing ``$WORLDVIEW_HOME`` with the
+location to the Worldview repository:
-* Find the ``AllowOverride None`` directive in the directory section for
-``/Library/WebServer/Documents`` and change it to ``AllowOverride All``. This
-allows the htaccess file in the service directory to enable CGI scripts.
-* Find the ``Listen`` directive and change to the following to prevent Apache
-from binding to all interfaces: ``Listen 127.0.0.1:80``
+ sudo cat > /private/etc/apache2/other/worldview.conf <<EOF
+ <Directory $WORLDVIEW_HOME>
+ AllowOverride All
+ </Directory>
+ EOF
Restart Apache:
@@ -113,7 +116,14 @@ Worldview should now be available at the following:
* [http://localhost/worldview](http://localhost/worldview)
* [http://localhost/worldview-debug](http://localhost/worldview-debug)
-* [http://localhost/worldview-prod](http://localhost/worldview-prod)
+* [http://localhost/worldview-release](http://localhost/worldview-release)
+* [http://localhost/worldview-doc](http://localhost/worldview-doc)
+
+### bit.ly URL shortening
+
+The permalink feature allows shortening of the URL. This requires an API
+key from bit.ly. To configure, copy ``conf/bitly_config.sample.py`` to
+``conf/bity_config.py``, edit the file, and fill in the proper values.
### Minification of CSS and JavaScript files
@@ -161,10 +171,38 @@ The following web roots will be created:
minified JavaScript and CSS files
* ``build/worldview-debug/web``: Development release with JavaScript and CSS
intact for debugging.
+* ``build/worldview-doc``: Source code documentation
+
+## Naming and Versioning
+
+The ``package.json`` file contains the name, version, and release number
+that is used when building the deployment packages. The name can be changed
+to allow side-by-side deployments of different branches. Executing:
+
+ grunt
+
+also creates distribution tarballs in the dist directory. Three "unversioned"
+files are generated:
+
+* ``dist/worldview.tar.bz2``
+* ``dist/worldview-debug.tar.bz2``
+* ``dist/worldview-doc.tar.bz2``
+
+Three "versioned" files are also generated in the form of:
+
+* ``dist/<name>-<version>-<release>.git<revision>.tar.bz2``
-Tarball artifacts will also be created in the ``dist``directory.
+Where ``name``, ``version``, ``release`` are the values found in the
+``package.json`` file and ``revision`` is the value from:
-## Configuration
+ git rev-parse --short HEAD
+
+
+## Grunt Targets
+
+These additional grunt targets are available.
+
+### Configurtion
The Worldivew configuration file is generated by concatenating all files
in ``etc/config/config`` and filling in palette information found in
@@ -175,6 +213,50 @@ an edit, issue the following command:
grunt config
+### Linting
+
+Check for common errors in the JavaScript and CSS files with:
+
+ grunt lint
+
+### Documentation
+
+Documentation can be built separately with:
+
+ grunt doc
+
+### Unit Tests
+
+Run unit test with the following:
+
+ grunt test
+
+This uses BusterJS with PhantomJS for headless browser testing. To test in an
+actual browser which is quicker, install the Buster command line tools
+with:
+
+ sudo npm install --global buster-cli
+
+For static testing like QUnit, run the following and navigate the web browser
+to the address shown:
+
+ buster-static
+
+For browser capturing, run the following and navigate the web browser to
+the address shown:
+
+ buster-server
+
+
+### RPM
+
+To create an RPM on CentOS 6, issue the following:
+
+ grunt rpm
+
+Built RPMs will be found in the ``dist`` directory.
+
+
## Copyright
This code was originally developed at NASA/Goddard Space Flight Center for
diff --git a/package.json b/package.json
index 17f776098..e0ef76c04 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "worldview-latest",
+ "name": "worldview-master",
"version": "0.7.0",
"release": "1",
"author": "Worldview Team <[email protected]>",