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 2013/07/25 00:13:03 UTC

[08/12] docs commit: [CB-3816] doc CLI's 'merges' feature

[CB-3816] doc CLI's 'merges' feature


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/e1f4b801
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/e1f4b801
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/e1f4b801

Branch: refs/heads/master
Commit: e1f4b801b11fac7d691da02ae4d8d0358ac95f61
Parents: 3d9c8c0
Author: Mike Sierra <le...@gmail.com>
Authored: Mon Jul 22 15:15:19 2013 -0400
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Wed Jul 24 15:11:39 2013 -0700

----------------------------------------------------------------------
 docs/en/edge/guide/cli/index.md | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/e1f4b801/docs/en/edge/guide/cli/index.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/cli/index.md b/docs/en/edge/guide/cli/index.md
index 42046b2..c01fd9d 100644
--- a/docs/en/edge/guide/cli/index.md
+++ b/docs/en/edge/guide/cli/index.md
@@ -276,6 +276,37 @@ debug console from a release version:
 You can batch-remove or add plugins by specifying more than one
 argument for each command.
 
+## Customize each Platform
+
+While Cordova allows you to easily build apps for different platforms,
+sometimes you need to add customizations.  In that case, you don't
+want to modify the CSS in various `www` directories within the
+top-level `platforms` directory, because they're regularly replaced
+with the top-level `www` directory's cross-platform source.  Instead,
+the top-level `merges` directory offers a place to specify assets to
+be deployed for specific platforms. Any file you place in a platform's
+subdirectory replaces a corresponding file within the top-level `www`
+source tree.
+
+Here is how you might uses `merges` to boost the default font size for
+Android devices:
+
+* Edit the `www/index.html` file, adding a link to an additional CSS
+  file, `overrides.css` in this case:
+
+        <link rel="stylesheet" type="text/css" href="css/overrides.css" />
+
+* Create an empty `www/css/overrides.css` file.
+
+* Edit a corresponding `merges/android/overrides.css` file, adding a
+  line that overrides the 12-point default font size specified within
+  `www/css/index.css`:
+
+        body { font-size:14px; }
+
+When you rebuild the project, the Android version features the custom
+font size.
+
 ## Update the App
 
 After installing installing the `cordova` utility, you can always