[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-09-26 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-57022338 merged, thx @csantanapr! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not hav

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-09-26 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/cordova-lib/pull/55 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-09-26 Thread csantanapr
Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-57020278 @sgrebnov I tested the pull request and it looks good :+1: . Go ahead and merge it into master. this is great extensibility feature :beers: :tophat: --- If your

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-09-26 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-56928367 Thanks, Carlos; I'm totally fine with either you or me merge it, just want someone else to review the code before pushing it to master --- If your project is set up

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-09-25 Thread csantanapr
Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-56910355 I will review the pull request and if it looks you want me to merge it or you want to do it @sgrebnov ? --- If your project is set up for it, you can reply to thi

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-09-25 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-56869972 All further changes and improvements we can file as separate JIRA issues/tasks --- If your project is set up for it, you can reply to this email and have your reply

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-09-25 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-56869833 I propose to merge this version since looks like it provides all basic functionality we want for unified hooks. If so, could someone review and merge --- If your pr

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-09-25 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-56856482 I compare tests results with results of master branch and see exactly the same tests failed, looks like this code does not add new failed tests master ht

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-09-25 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-56843816 rebased on top of apache/master; I see some unit tests are failed now, investigating .. --- If your project is set up for it, you can reply to this email and have y

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-15 Thread csantanapr
Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-52305148 @purplecabbage That was one of my points, that context.cmdLine is not useful as a String. Why slide() and not just context.cmdLine = process.argv ? just to get

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-14 Thread purplecabbage
Github user purplecabbage commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-52261451 Thinking about this some more, I think we should just pass ```context.cmdLine = process.argv.slice()``` or perhaps more unambiguously ```context.proc_argv = pro

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-14 Thread purplecabbage
Github user purplecabbage commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-52243131 @csantanapr If your hook-script is node, it will be loaded as a module, so you still have access to process.argv don't you? --- If your project is set up

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-14 Thread csantanapr
Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-52238594 @sgrebnov here some feedback about context.cmdLine Any strong reason why this has to be a string instead of an Array like process.argv ? https://

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-12 Thread csantanapr
Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51937234 @sgrebnov I agree now that plugin hooks are located in a unique place like plugins/mypluginid/src I can have my node module dependencies isolated without impacting

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-12 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51905210 + sharing some my experiments with plugin hooks: WP8 JavaScript debugger implemented as cordova plugin https://github.com/sgrebnov/cordova-debug-wp8 https://v

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-12 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51904349 Answering Carlos questions 1. I believe recommended solution here is placing required dependencies along with plugin (node_modules folder inside your scripts fol

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-12 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51903709 Thx for review and notes. +1000 to wrap parameters to special class instance, but I would prefer to push this version since it takes time to re-base it all over the

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-11 Thread csantanapr
Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51868071 @sgrebnov How do I get the command line arguments out from Context? In none javascript interface this is located in CORDOVA_CMDLINE --- If your project is set

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-11 Thread csantanapr
Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51868008 Here is a gist of a Hook I'm working on for IBM https://gist.github.com/csantanapr/9fc45c76b4d9a2d5ef85 You can see how I'm using Context opts and requi

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-11 Thread kamrik
Github user kamrik commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51841422 I think we should leave this decision to Sergey and the Microsoft guys. While it would be nice to have CordovaProject class right away, it might take quite some time a

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-11 Thread csantanapr
Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51840027 I mean land in terms of pushing to master for others to contribute, and when feature is ready document as public api/feature. --- If your project is set up for i

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-11 Thread csantanapr
Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51839887 So how do we move forward with plugin hooks? Do we land what we have here and then open a new JIRA to take care about cordovaProject object? --- If your

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-11 Thread agrieve
Github user agrieve commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51811935 +1 for the "or even" clause there. I'd like to be able to write: var cordovaProject = cordova_lib.loadProject(rootDir) cordovaProject.setVerbosity(

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-11 Thread kamrik
Github user kamrik commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51810029 Unfortunately utils.js knows nothing about the project, it re-reads all the info from file system on each call. This results in lots of cases of re-parsing of config f

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-11 Thread csantanapr
Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51805610 Yes I agree having a class, but still pass a single context to the hook and then the Context object contains a CordovaProject class object return by util.js I t

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-11 Thread kamrik
Github user kamrik commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51783588 Problems with opts objects arise all over the place in cordova-lib, I got bitten by similar problems several times. My proposal would be to create a CordovaProject cla

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-10 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51718759 Confirm this issue, @csantanapr I've cherry-picked your fix (Thx!), also added minor improvement. We may want to better formalize opts structure (special class?) -

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-08 Thread csantanapr
Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51601294 @sgrebnov So far I have found one problem. When I have the hooks tags inside a platform, the second tag for "after_prepare" doesn't work. This is because op

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-06 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51389090 btw, loooks like all tests are passed on both windows and linux --- If your project is set up for it, you can reply to this email and have your reply appear on GitHu

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-06 Thread daserge
Github user daserge commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51382634 Rebased to master and investigating issues with `uninstall-browserify.spec.js` now. `cordova.js` seems to be blocked inside fixture projects by `uninstall-browser

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-08-01 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-50883550 Addressed @kamrik code review notes --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project d

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-07-31 Thread sgrebnov
Github user sgrebnov commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/55#discussion_r15658798 --- Diff: cordova-lib/src/hooks/scriptsFinder.js --- @@ -0,0 +1,164 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-07-31 Thread kamrik
Github user kamrik commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/55#discussion_r15655705 --- Diff: cordova-lib/src/hooks/scriptsFinder.js --- @@ -0,0 +1,164 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or mo

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-07-11 Thread sgrebnov
Github user sgrebnov commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/55#discussion_r14822338 --- Diff: cordova-lib/src/hooks/ScriptsFinder.js --- @@ -0,0 +1,158 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-07-11 Thread kamrik
Github user kamrik commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/55#discussion_r14821829 --- Diff: cordova-lib/src/hooks/ScriptsFinder.js --- @@ -0,0 +1,158 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or mo

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-07-11 Thread sgrebnov
Github user sgrebnov commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/55#discussion_r14821551 --- Diff: cordova-lib/src/hooks/ScriptsFinder.js --- @@ -0,0 +1,158 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-07-11 Thread kamrik
Github user kamrik commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/55#discussion_r14820487 --- Diff: cordova-lib/src/hooks/ScriptsFinder.js --- @@ -0,0 +1,158 @@ +/** + Licensed to the Apache Software Foundation (ASF) under one + or mo

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-07-11 Thread sgrebnov
Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-48701880 Addressed docs review notes: deprecated .cordova/hooks directory --- If your project is set up for it, you can reply to this email and have your reply appear on Git

[GitHub] cordova-lib pull request: CB-6481 Add unified hooks support for co...

2014-07-09 Thread sgrebnov
GitHub user sgrebnov opened a pull request: https://github.com/apache/cordova-lib/pull/55 CB-6481 Add unified hooks support for cordova app and plugins https://issues.apache.org/jira/browse/CB-6481 Added the following changes and new features * Hooks can be defined in .c