basic hook info in the readme
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/commit/5037bad4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/tree/5037bad4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/diff/5037bad4 Branch: refs/heads/cordova-client Commit: 5037bad427eea7344cc34c788427e6163310d565 Parents: cb2e1f3 Author: Fil Maj <maj....@gmail.com> Authored: Wed Oct 3 21:22:53 2012 -0700 Committer: Fil Maj <maj....@gmail.com> Committed: Wed Oct 3 21:22:53 2012 -0700 ---------------------------------------------------------------------- README.md | 29 +++++++++++++---------------- 1 files changed, 13 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/5037bad4/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 62c1d12..1af49c4 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ cordova-client has a single global `create` command that creates new cordova pro - `create <directory> [<id> [<name>]]` create a new cordova project with optional name and id (package name, reverse-domain style) +<a name="project_commands" /> ## Project Commands - `platform [ls | list]` list all platforms the project will build to @@ -44,7 +45,7 @@ cordova-client has a single global `create` command that creates new cordova pro - `emulate [<platform> [<platform> [...]]]` launch emulators and deploy app to them. With no parameters emulates for all platforms added to the project, otherwise emulates for the specified platforms -## File and Directory Structure +# Project Directory Structure A Cordova application built with cordova-client will have the following directory structure: @@ -54,27 +55,31 @@ directory structure: |- plugins/ `- www/ -### .cordova/ -This file identifies a tree as a cordova project. Simple configuration information is stored in here (such as BlackBerry environment variables). +## .cordova/ +This directory identifies a tree as a cordova project. Simple configuration information is stored in here (such as BlackBerry environment variables). Commands other than `create` operate against the project directory itself, rather than the current directory - a search up the current directory's parents is made to find the project directory. Thus, any command (other than `create`) can be used from any subdirectory whose parent is a cordova project directory (same as git). -### platforms/ +## platforms/ Platforms added to your application will have the native application project structures laid out within this directory. -### plugins/ +## plugins/ Any added plugins will be extracted or copied into this directory. -### www/ +## www/ Contains the project's web artifacts, such as .html, .css and .js files. These are your main application assets. The config.xml file within this directory is very important; read on to the next section! -#### Your Blanket: www/config.xml +### Your Blanket: www/config.xml This file is what you should be editing to modify your application's metadata. Any time you run any cordova-client commands, the tool will look at the contents of `config.xml` and use all relevant info from this file to define native application information. cordova-client supports changing your application's data via the following elements inside the `config.xml` file: - The user-facing name can be modified via the contents of the `<name>` element. +# Hooks + +Projects created by cordova-client have `before` and `after` hooks for each [project command](#project_commands). These are located under the `.cordova/hooks` directory in the root of your cordova project. Any scripts you add to these directories will be executed before and after the appropriate commands. Useful for integrating your own build systems or integrating with version control systems. + # Examples ## Creating a new cordova project @@ -114,18 +119,10 @@ The directory structure of KewlApp now looks like this: npm test -## Managing Plugins - -Plugin integration hinges on: - -- You having the plugin code locally on your computer -- The plugin code adheres to the [Cordova Plugin Specification](https://github.com/alunny/cordova-plugin-spec) - - ## TO-DO + Issues Please check [cordova-client on GitHub](http://github.com/filmaj/cordova-client). ## Contributors -A big thank you to all people who have made this project possible. For a list of people involved, please see the `package.json` file. +Thanks to everyone for contributing! For a list of people involved, please see the `package.json` file.