docs: some minor improvements (#234)
* docs: improve project structure overview
* docs: split long paragraph
diff --git a/README.md b/README.md
index 6b28d51..d430bd3 100644
--- a/README.md
+++ b/README.md
@@ -33,8 +33,10 @@
./
|-build-tools/ ......... custom bundler for our CommonJS-like modules
|-pkg/ ................. generated platform cordova.js files
- |-src/
+ |
+ |-src/ ................. the code that makes up Cordova's JavaScript runtime
| |-cordova.js ........ common Cordova stuff
+ | |
| |-common/ ........... base modules shared across platfoms
| | |-argscheck.js ... utility for type-checking arguments during runtime
| | |-base64.js ...... base64 utilites (toArrayBuffer & fromArrayBuffer)
@@ -43,12 +45,12 @@
| | |-init.js ........ bootstraps the Cordova platform, inject APIs and fire events
| | |-utils.js ....... closures, uuids, object, cloning, extending prototypes
| | |
- | | |-exec/ .......... exec methods
- | | | '-proxy.js .... utility for adding and removing exec proxy methods
+ | | '-exec/ .......... exec methods
+ | | '-proxy.js .... utility for adding and removing exec proxy methods
| |
- | |-scripts/ .......... non-module JS that gets concatenated to cordova.<platform>.js
- | | |-bootstrap.js ... bootstrap the Cordova platform, inject APIs and fire events
- | | '-require.js ..... module definition and require() implementation
+ | '-scripts/ .......... non-module JS that gets concatenated to cordova.<platform>.js
+ | |-bootstrap.js ... bootstrap the Cordova platform, inject APIs and fire events
+ | '-require.js ..... module definition and require() implementation
|
'-tests/ ............... unit tests
```
@@ -101,7 +103,9 @@
cordova.require('cordova/channel').onNativeReady.fire()
```
-The `boot` method does all the work. First, it grabs the common platform definition (under `src/common/common.js`) and injects all of the objects defined there onto `window` and other global namespaces. Next, it grabs all of the platform-specific object definitions (as defined under `src/<platform>/platform.js`) and overrides those onto `window`. Finally, it calls the platform-specific `initialize` function (located in the platform definition). At this point, Cordova is fully initialized and ready to roll. Last thing we do is wait for the `DOMContentLoaded` event to fire to make sure the page has loaded properly. Once that is done, Cordova fires the `deviceready` event where you can safely attach functions that consume the Cordova APIs.
+The `boot` method does all the work. First, it grabs the common platform definition (under `src/common/common.js`) and injects all of the objects defined there onto `window` and other global namespaces. Next, it grabs all of the platform-specific object definitions (as defined under `src/<platform>/platform.js`) and overrides those onto `window`.
+
+Finally, it calls the platform-specific `initialize` function (located in the platform definition). At this point, Cordova is fully initialized and ready to roll. Last thing we do is wait for the `DOMContentLoaded` event to fire to make sure the page has loaded properly. Once that is done, Cordova fires the `deviceready` event where you can safely attach functions that consume the Cordova APIs.
## Testing