You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2012/03/31 01:47:22 UTC

[9/12] Update build script to support cordova namespace.

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/database/database.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/database/database.md b/docs/en/edge/phonegap/storage/database/database.md
deleted file mode 100644
index 9643375..0000000
--- a/docs/en/edge/phonegap/storage/database/database.md
+++ /dev/null
@@ -1,104 +0,0 @@
-Database
-=======
-
-Contains methods that allow the user to manipulate the Database
-
-Methods
--------
-
-- __transaction__: Runs a database transaction. 
-- __changeVersion__: method allows scripts to atomically verify the version number and change it at the same time as doing a schema update. 
-
-Details
--------
-
-A Database object is returned from a call to `window.openDatabase()`.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 6.0 and higher)
-- iPhone
-
-Transaction Quick Example
-------------------
-	function populateDB(tx) {
-		 tx.executeSql('DROP TABLE IF EXISTS DEMO');
-		 tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
-		 tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")');
-		 tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")');
-	}
-	
-	function errorCB(err) {
-		alert("Error processing SQL: "+err.code);
-	}
-	
-	function successCB() {
-		alert("success!");
-	}
-	
-	var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-	db.transaction(populateDB, errorCB, successCB);
-
-Change Version Quick Example
--------------------
-
-	var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-	db.changeVersion("1.0", "1.1");
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Contact Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-1.6.0.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for Cordova to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // Cordova is ready
-        //
-        function onDeviceReady() {
-			var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-			db.transaction(populateDB, errorCB, successCB);
-        }
-		
-		// Populate the database 
-		//
-		function populateDB(tx) {
-			 tx.executeSql('DROP TABLE IF EXISTS DEMO');
-			 tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
-			 tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")');
-			 tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")');
-		}
-		
-		// Transaction error callback
-		//
-		function errorCB(tx, err) {
-			alert("Error processing SQL: "+err);
-		}
-		
-		// Transaction success callback
-		//
-		function successCB() {
-			alert("success!");
-		}
-	
-        </script>
-      </head>
-      <body>
-        <h1>Example</h1>
-        <p>Database</p>
-      </body>
-    </html>
-
-Android 1.X Quirks
-------------------
-
-- __changeVersion:__ This method is not support by Android 1.X devices.

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/localstorage/localstorage.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/localstorage/localstorage.md b/docs/en/edge/phonegap/storage/localstorage/localstorage.md
deleted file mode 100644
index b8601ec..0000000
--- a/docs/en/edge/phonegap/storage/localstorage/localstorage.md
+++ /dev/null
@@ -1,91 +0,0 @@
-localStorage
-===============
-
-Provides access to a W3C Storage interface (http://dev.w3.org/html5/webstorage/#the-localstorage-attribute)
-
-    var storage = window.localStorage;
-
-Methods
--------
-
-- __key__: Returns the name of the key at the position specified. 
-- __getItem__: Returns the item identified by it's key.
-- __setItem__: Saves and item at the key provided.
-- __removeItem__: Removes the item identified by it's key.
-- __clear__: Removes all of the key value pairs.
-
-Details
------------
-
-localStorage provides an interface to a W3C Storage interface.  It allows one to save data as key-value pairs.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 6.0 and higher)
-- iPhone
-
-Key Quick Example
--------------
-
-    var keyName = window.localStorage.key(0);
-
-Set Item Quick Example
--------------
-
-    window.localStorage.setItem("key", "value");
-
-Get Item Quick Example
--------------
-
-	var value = window.localStorage.getItem("key");
-	// value is now equal to "value"
-
-Remove Item Quick Example
--------------
-
-	window.localStorage.removeItem("key");
-
-Clear Quick Example
--------------
-
-	window.localStorage.clear();
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Contact Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-1.6.0.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for Cordova to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // Cordova is ready
-        //
-        function onDeviceReady() {
-			window.localStorage.setItem("key", "value");
-			var keyname = window.localStorage.key(i);
-			// keyname is now equal to "key"
-			var value = window.localStorage.getItem("key");
-			// value is now equal to "value"
-			window.localStorage.removeItem("key");
-			window.localStorage.setItem("key2", "value2");
-			window.localStorage.clear();
-			// localStorage is now empty
-        }
-    
-
-        </script>
-      </head>
-      <body>
-        <h1>Example</h1>
-        <p>localStorage</p>
-      </body>
-    </html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/parameters/display_name.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/parameters/display_name.md b/docs/en/edge/phonegap/storage/parameters/display_name.md
deleted file mode 100644
index cf99b51..0000000
--- a/docs/en/edge/phonegap/storage/parameters/display_name.md
+++ /dev/null
@@ -1,4 +0,0 @@
-database_displayname
-==================
-
-The display name of the database.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/parameters/name.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/parameters/name.md b/docs/en/edge/phonegap/storage/parameters/name.md
deleted file mode 100644
index 6184633..0000000
--- a/docs/en/edge/phonegap/storage/parameters/name.md
+++ /dev/null
@@ -1,4 +0,0 @@
-database_name
-============
-
-The name of the database.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/parameters/size.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/parameters/size.md b/docs/en/edge/phonegap/storage/parameters/size.md
deleted file mode 100644
index 1e96ccc..0000000
--- a/docs/en/edge/phonegap/storage/parameters/size.md
+++ /dev/null
@@ -1,4 +0,0 @@
-database_size
-==============
-
-The size of the database in bytes.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/parameters/version.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/parameters/version.md b/docs/en/edge/phonegap/storage/parameters/version.md
deleted file mode 100644
index 712dc78..0000000
--- a/docs/en/edge/phonegap/storage/parameters/version.md
+++ /dev/null
@@ -1,4 +0,0 @@
-database_version
-=============
-
-The version of the database.

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/sqlerror/sqlerror.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/sqlerror/sqlerror.md b/docs/en/edge/phonegap/storage/sqlerror/sqlerror.md
deleted file mode 100644
index 9f12197..0000000
--- a/docs/en/edge/phonegap/storage/sqlerror/sqlerror.md
+++ /dev/null
@@ -1,28 +0,0 @@
-SQLError
-========
-
-A `SQLError` object is thrown when an error occurs.
-
-Properties
-----------
-
-- __code:__ One of the predefined error codes listed below.
-- __message:__ A description of the error.
-
-Constants
----------
-
-- `SQLError.UNKNOWN_ERR`
-- `SQLError.DATABASE_ERR`
-- `SQLError.VERSION_ERR`
-- `SQLError.TOO_LARGE_ERR`
-- `SQLError.QUOTA_ERR`
-- `SQLError.SYNTAX_ERR`
-- `SQLError.CONSTRAINT_ERR`
-- `SQLError.TIMEOUT_ERR`
-
-Description
------------
-
-The `SQLError` object is thrown when an error occurs when manipulating a database.
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/sqlresultset/sqlresultset.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/sqlresultset/sqlresultset.md b/docs/en/edge/phonegap/storage/sqlresultset/sqlresultset.md
deleted file mode 100644
index 4fb46c8..0000000
--- a/docs/en/edge/phonegap/storage/sqlresultset/sqlresultset.md
+++ /dev/null
@@ -1,115 +0,0 @@
-SQLResultSet
-=======
-
-When the executeSql method of a SQLTransaction is called it will invoke it's callback with a SQLResultSet.
-
-Properties
--------
-
-- __insertId__: the row ID of the row that the SQLResultSet object's SQL statement inserted into the database
-- __rowAffected__: the number of rows that were changed by the SQL statement.  If the statement did not affect any rows then it is set to 0. 
-- __rows__: a SQLResultSetRowList representing the rows returned.  If no rows are returned the object will be empty.
-
-Details
--------
-
-When you call the SQLTransaction executeSql method it's callback methods will be called with a SQLResultSet object.  The result object has three properties.  The first is the `insertId` which will return the row number of a success SQL insert statement.  If the SQL statement is not an insert then the `insertId` is not set.  The `rowAffected` is always 0 for a SQL select statement.  For insert or update statements it returns the number of rows that have been modified.  The final property is of type SQLResultSetList and it contains the data returned from a SQL select statement.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 6.0 and higher)
-- iPhone
-
-Execute SQL Quick Example
-------------------
-
-	function queryDB(tx) {
-		tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);
-	}
-
-	function querySuccess(tx, results) {
-		// this will be empty since no rows were inserted.
-		console.log("Insert ID = " + results.insertId);
-		// this will be 0 since it is a select statement
-		console.log("Rows Affected = " + results.rowAffected);
-		// the number of rows returned by the select statement
-		console.log("Insert ID = " + results.rows.length);
-	}
-	
-	function errorCB(err) {
-		alert("Error processing SQL: "+err.code);
-	}
-	
-	var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-	db.transaction(queryDB, errorCB);
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Contact Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-1.6.0.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for Cordova to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-		// Populate the database 
-		//
-		function populateDB(tx) {
-			tx.executeSql('DROP TABLE IF EXISTS DEMO');
-			tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
-			tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")');
-			tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")');
-		}
-
-		// Query the database
-		//
-		function queryDB(tx) {
-			tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);
-		}
-
-		// Query the success callback
-		//
-		function querySuccess(tx, results) {
-			// this will be empty since no rows were inserted.
-			console.log("Insert ID = " + results.insertId);
-			// this will be 0 since it is a select statement
-			console.log("Rows Affected = " + results.rowAffected);
-			// the number of rows returned by the select statement
-			console.log("Insert ID = " + results.rows.length);
-		}
-
-		// Transaction error callback
-		//
-		function errorCB(err) {
-			console.log("Error processing SQL: "+err.code);
-		}
-
-		// Transaction success callback
-		//
-		function successCB() {
-			var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-			db.transaction(queryDB, errorCB);
-		}
-
-		// Cordova is ready
-		//
-		function onDeviceReady() {
-			var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-			db.transaction(populateDB, errorCB, successCB);
-		}
-	
-        </script>
-      </head>
-      <body>
-        <h1>Example</h1>
-        <p>Database</p>
-      </body>
-    </html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/sqlresultsetlist/sqlresultsetlist.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/sqlresultsetlist/sqlresultsetlist.md b/docs/en/edge/phonegap/storage/sqlresultsetlist/sqlresultsetlist.md
deleted file mode 100644
index 9886ecf..0000000
--- a/docs/en/edge/phonegap/storage/sqlresultsetlist/sqlresultsetlist.md
+++ /dev/null
@@ -1,116 +0,0 @@
-SQLResultSetList
-=======
-
-One of the properties of the SQLResultSet containing the rows returned from a SQL query.
-
-Properties
--------
-
-- __length__: the number of rows returned by the SQL query
-
-Methods
--------
-
-- __item__: returns the row at the specified index represented by a JavaScript object.
-
-Details
--------
-
-The SQLResultSetList contains the data returned from a SQL select statement.  The object contains a length property letting you know how many rows the select statement has been returned.  To get a row of data you would call the `item` method specifing an index.  The item method returns a JavaScript Object who's properties are the columns of the database the select statement was executed against.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 6.0 and higher)
-- iPhone
-
-Execute SQL Quick Example
-------------------
-
-	function queryDB(tx) {
-		tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);
-	}
-
-	function querySuccess(tx, results) {
-		var len = results.rows.length;
-	���	console.log("DEMO table: " + len + " rows found.");
-	���	for (var i=0; i<len; i++){
-	����	console.log("Row = " + i + " ID = " + results.rows.item(i).id + " Data =  " + results.rows.item(i).data);
-		}
-	}
-	
-	function errorCB(err) {
-		alert("Error processing SQL: "+err.code);
-	}
-	
-	var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-	db.transaction(queryDB, errorCB);
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Contact Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-1.6.0.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for Cordova to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-		// Populate the database 
-		//
-		function populateDB(tx) {
-			tx.executeSql('DROP TABLE IF EXISTS DEMO');
-			tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
-			tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")');
-			tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")');
-		}
-
-		// Query the database
-		//
-		function queryDB(tx) {
-			tx.executeSql('SELECT * FROM DEMO', [], querySuccess, errorCB);
-		}
-
-		// Query the success callback
-		//
-		function querySuccess(tx, results) {
-			var len = results.rows.length;
-			console.log("DEMO table: " + len + " rows found.");
-			for (var i=0; i<len; i++){
-				console.log("Row = " + i + " ID = " + results.rows.item(i).id + " Data =  " + results.rows.item(i).data);
-			}
-		}
-
-		// Transaction error callback
-		//
-		function errorCB(err) {
-			console.log("Error processing SQL: "+err.code);
-		}
-
-		// Transaction success callback
-		//
-		function successCB() {
-			var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-			db.transaction(queryDB, errorCB);
-		}
-
-		// Cordova is ready
-		//
-		function onDeviceReady() {
-			var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-			db.transaction(populateDB, errorCB, successCB);
-		}
-	
-        </script>
-      </head>
-      <body>
-        <h1>Example</h1>
-        <p>Database</p>
-      </body>
-    </html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/sqltransaction/sqltransaction.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/sqltransaction/sqltransaction.md b/docs/en/edge/phonegap/storage/sqltransaction/sqltransaction.md
deleted file mode 100644
index 20989c8..0000000
--- a/docs/en/edge/phonegap/storage/sqltransaction/sqltransaction.md
+++ /dev/null
@@ -1,93 +0,0 @@
-SQLTransaction
-=======
-
-Contains methods that allow the user to execute SQL statements against the Database.
-
-Methods
--------
-
-- __executeSql__: executes a SQL statement
-
-Details
--------
-
-When you call a Database objects transaction method it's callback methods will be called with a SQLTransaction object.  The user can build up a database transaction by calling the executeSql method multiple times.  
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 6.0 and higher)
-- iPhone
-
-Execute SQL Quick Example
-------------------
-
-	function populateDB(tx) {
-		 tx.executeSql('DROP TABLE IF EXISTS DEMO');
-		 tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
-		 tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")');
-		 tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")');
-	}
-	
-	function errorCB(err) {
-		alert("Error processing SQL: "+err);
-	}
-	
-	function successCB() {
-		alert("success!");
-	}
-	
-	var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-	db.transaction(populateDB, errorCB, successCB);
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Contact Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-1.6.0.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for Cordova to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // Cordova is ready
-        //
-        function onDeviceReady() {
-			var db = window.openDatabase("Database", "1.0", "Cordova Demo", 200000);
-			db.transaction(populateDB, errorCB, successCB);
-        }
-		
-		// Populate the database 
-		//
-		function populateDB(tx) {
-			 tx.executeSql('DROP TABLE IF EXISTS DEMO');
-			 tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');
-			 tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, "First row")');
-			 tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, "Second row")');
-		}
-		
-		// Transaction error callback
-		//
-		function errorCB(err) {
-			alert("Error processing SQL: "+err);
-		}
-		
-		// Transaction success callback
-		//
-		function successCB() {
-			alert("success!");
-		}
-	
-        </script>
-      </head>
-      <body>
-        <h1>Example</h1>
-        <p>SQLTransaction</p>
-      </body>
-    </html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/storage.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/storage.md b/docs/en/edge/phonegap/storage/storage.md
deleted file mode 100644
index 1ce586e..0000000
--- a/docs/en/edge/phonegap/storage/storage.md
+++ /dev/null
@@ -1,29 +0,0 @@
-Storage
-==========
-
-> Provides access to the devices storage options.  
-
-This API is based on the [W3C Web SQL Database Specification](http://dev.w3.org/html5/webdatabase/) and [W3C Web Storage API Specification](http://dev.w3.org/html5/webstorage/). Some devices already provide an implementation of this spec. For those devices, the built-in support is used instead of replacing it with Cordova's implementation. For devices that don't have storage support, Cordova's implementation should be compatible with the W3C specification.
-
-Methods
--------
-
-- openDatabase
-
-Arguments
----------
-
-- database_name
-- database_version
-- database_displayname
-- database_size
-
-Objects
--------
-
-- Database
-- SQLTransaction
-- SQLResultSet
-- SQLResultSetList
-- SQLError
-- localStorage
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/docs/en/edge/phonegap/storage/storage.opendatabase.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/phonegap/storage/storage.opendatabase.md b/docs/en/edge/phonegap/storage/storage.opendatabase.md
deleted file mode 100644
index 7493081..0000000
--- a/docs/en/edge/phonegap/storage/storage.opendatabase.md
+++ /dev/null
@@ -1,54 +0,0 @@
-openDatabase
-===============
-
-Returns a new Database object.
-
-    var dbShell = window.openDatabase(database_name, database_version, database_displayname, database_size);
-
-Description
------------
-
-window.openDatabase returns a new Database object.
-
-This method will create a new SQL Lite Database and return a Database object.  Use the Database Object to manipulate the data.
-
-Supported Platforms
--------------------
-
-- Android
-- BlackBerry WebWorks (OS 6.0 and higher)
-- iPhone
-
-Quick Example
--------------
-
-    var db = window.openDatabase("test", "1.0", "Test DB", 1000000);
-
-Full Example
-------------
-
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <title>Contact Example</title>
-
-        <script type="text/javascript" charset="utf-8" src="cordova-1.6.0.js"></script>
-        <script type="text/javascript" charset="utf-8">
-
-        // Wait for Cordova to load
-        //
-        document.addEventListener("deviceready", onDeviceReady, false);
-
-        // Cordova is ready
-        //
-        function onDeviceReady() {
-			var db = window.openDatabase("test", "1.0", "Test DB", 1000000);
-        }
-		
-        </script>
-      </head>
-      <body>
-        <h1>Example</h1>
-        <p>Open Database</p>
-      </body>
-    </html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/lib/cordova/file_merger.rb
----------------------------------------------------------------------
diff --git a/lib/cordova/file_merger.rb b/lib/cordova/file_merger.rb
index 1508698..0667ae0 100644
--- a/lib/cordova/file_merger.rb
+++ b/lib/cordova/file_merger.rb
@@ -6,36 +6,51 @@ class FileMerger
   def initialize
   end
 
-  def run(file_path)
-    # partial files are deleted after being merged, so they may not exist
-    return unless File.exists? file_path
+  def run(filepath)
+    # skip missing files (file that are merged are also deleted)
+    return unless File.exists?(filepath)
     
-    root_name = File.basename file_path
-    @root_dir ||= File.dirname file_path
-    @json     ||= config_json(@root_dir)['merge']
-
-    @json.each do |name, files| 
-      if name == root_name
-        File.open file_path, 'a' do |file|
-          files.each do |filename|
-            # skip the file that is opened for appending
-            next if File.basename(filename) == root_name
-
-            filename = File.join @root_dir, filename
-            next unless file_exists? filename
-
-            file.write "\n\n---\n"
-            file.write File.read(filename).strip
-            FileUtils.rm filename unless name == File.basename(filename)
-          end
-        end
+    # file info
+    @filename  = File.basename(filepath)
+    @directory = File.dirname(filepath)
+    
+    # skip unless file is referenced in the merge JSON
+    return unless config.include?(@filename)
+    
+    # open the file to merge into
+    File.open filepath, 'a' do |f|
+      # loop over the files to merge
+      config[@filename].each do |filepath|
+        # skip the file that we're merging into because it's listed in config.json
+        next if File.basename(filepath) == @filename
+        
+        # hacky to qualify the path
+        filepath = File.join('tmp', 'docs', filepath)
+        
+        # append and delete the file
+        f.write "\n\n---\n"
+        f.write File.read(filepath).strip
+        FileUtils.rm filepath
       end
     end
   end
 
-  def config_json(basename)
-      file = File.join basename, 'config.json'
-      return JSON.parse IO.read(file)
+  def config
+      return @config unless @config.nil?
+      
+      directory = @directory
+      
+      while @config.nil?
+        file = File.join(directory, 'config.json')
+        
+        if File.exists?(file)
+          @config = (JSON.parse IO.read(file))['merge']
+        else
+          directory = File.dirname(directory)
+        end
+      end
+      
+      return @config
   end
 
   def file_exists?(file_path)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/lib/cordova/quirks_merger.rb
----------------------------------------------------------------------
diff --git a/lib/cordova/quirks_merger.rb b/lib/cordova/quirks_merger.rb
deleted file mode 100644
index bdaee95..0000000
--- a/lib/cordova/quirks_merger.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-require 'fileutils'
-
-class QuirksMerger
-  attr_accessor :cordova_path
-  
-  def run(file_path)
-    @cordova_path = nil
-    
-    platform_directory = find_directory_containing(file_path, 'phonegap')
-    platform_directory = find_directory_containing(file_path, 'cordova') if platform_directory.nil?
-    return if platform_directory.nil?
-    return if ['phonegap', 'cordova'].include?(File.basename(platform_directory).downcase)
-    
-    @cordova_path = generate_cordova_path(file_path, platform_directory)
-    return unless File.file? @cordova_path
-    
-    cordova_data = File.read(@cordova_path).strip
-    partial_data  = File.read(file_path).strip
-
-    File.open(@cordova_path, 'w') { |file| file.write(cordova_data + "\n\n" + partial_data) }
-    FileUtils.rm file_path
-  end
-  
-  protected
-  
-  def find_directory_containing(directory, directory_to_find)
-    platform_name = nil
-    
-    until File.exists? File.join(directory, directory_to_find)
-      return nil if File.dirname(directory) == directory
-      
-      platform_name = File.basename(directory)
-      directory     = File.dirname(directory)
-    end
-    
-    File.join directory, platform_name
-  end
-  
-  def generate_cordova_path(full_path, platform_path)
-    path = {
-      :prefix   => File.dirname(platform_path),
-      :platform => File.basename(platform_path),
-      :postfix  => full_path.sub(platform_path, '')
-    }
-    
-    "#{path[:prefix]}/#{path[:platform]}/#{path[:postfix]}".gsub(/\/+/, '/')
-  end
-end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/e9b00f53/lib/docs_generator.rb
----------------------------------------------------------------------
diff --git a/lib/docs_generator.rb b/lib/docs_generator.rb
index 9eeb852..e115ab7 100644
--- a/lib/docs_generator.rb
+++ b/lib/docs_generator.rb
@@ -2,7 +2,6 @@ $: << File.join(File.dirname(__FILE__))
 $: << File.join(File.dirname(__FILE__), 'cordova')
 require 'file_helpers'
 require 'yaml_front_matter'
-require 'quirks_merger'
 require 'file_merger'
 require 'add_title'
 require 'update_index'
@@ -64,7 +63,7 @@ class DocsGenerator
   protected
   
   def before_jodoc(input_directory, options)
-    klasses = [ YamlFrontMatter.new, QuirksMerger.new, FileMerger.new ]
+    klasses = [ YamlFrontMatter.new, FileMerger.new ]
     
     klasses.each do |klass|
       each_file input_directory do |file|