Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5CDFEC064 for ; Tue, 12 Aug 2014 02:59:12 +0000 (UTC) Received: (qmail 39788 invoked by uid 500); 12 Aug 2014 02:59:12 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 39765 invoked by uid 500); 12 Aug 2014 02:59:12 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 39754 invoked by uid 99); 12 Aug 2014 02:59:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2014 02:59:12 +0000 Date: Tue, 12 Aug 2014 02:59:12 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-6481) Add unified hooks support for cordova app and plugins MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-6481?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1409367= 1#comment-14093671 ]=20 ASF GitHub Bot commented on CB-6481: ------------------------------------ Github user csantanapr commented on the pull request: https://github.com/apache/cordova-lib/pull/55#issuecomment-51868008 =20 Here is a gist of a Hook I'm working on for IBM https://gist.github.com/csantanapr/9fc45c76b4d9a2d5ef85 =20 You can see how I'm using Context opts and requireCordovaModule 2 Items I'm looking how to improve is: 1. I want to be able to use nopt module, but I can't using requireCord= ovaModule, because nopt is a dep from cli not cordova-lib 2. Getting a parser for the platform doing=20 platforms =3D context.requireCordovaModule('../cordova/platforms') parser =3D new platforms[platformId].parser(platformPath); parser.www_dir() It feels like using a private API ;-) > Add unified hooks support for cordova app and plugins > ----------------------------------------------------- > > Key: CB-6481 > URL: https://issues.apache.org/jira/browse/CB-6481 > Project: Apache Cordova > Issue Type: New Feature > Components: CLI, Plugman > Reporter: Sergey Grebnov > Assignee: Sergey Grebnov > > As per "Proposal: hooks support for plugins" dev mail thread discussion > Hi, I have an idea how we can add more flexibility to plugin developers. > Note, right now we have Application Developers =E2=80=93 someone who use = Cordova for developing applications and Plugin Developers =E2=80=93 someone= who creates plugins so that Application Developers can use them. For Appli= cation Developers we expose hooks so that they can customize their build/p= ackage/etc process. I want us to provide similar sort of flexibility to Plu= gin Developers so that they can go beyond of , tags = and get mechanism to add custom installation, build logic required by a pl= ugin. Example usage will include: downloading/compiling additional binaries= , marking source file to be copied to output dir, changing target build pla= tform, etc. At present time the steps described could be only achieved by = hooks manually added by Application Developer, but the right way is to allo= w Plugin Developer to expose this as part of plugin definition. > Example configuration could look like > ``` >