Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C0B741763C for ; Tue, 10 Mar 2015 16:18:33 +0000 (UTC) Received: (qmail 42842 invoked by uid 500); 10 Mar 2015 16:18:33 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 42804 invoked by uid 500); 10 Mar 2015 16:18:33 -0000 Mailing-List: contact dev-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 dev@cordova.apache.org Received: (qmail 42791 invoked by uid 99); 10 Mar 2015 16:18:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Mar 2015 16:18:33 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of stevengill97@gmail.com designates 209.85.216.174 as permitted sender) Received: from [209.85.216.174] (HELO mail-qc0-f174.google.com) (209.85.216.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Mar 2015 16:18:08 +0000 Received: by qcwb13 with SMTP id b13so3087511qcw.12 for ; Tue, 10 Mar 2015 09:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=WWxjnXTpg5IYgz61jU9OXa5/Vu3oMuaQoBfTIOOGxWg=; b=jhQa0bRkViA3w0D6vAbYJfLPibU+LFgxPvpMazNe6gTp/4hatTZCFYXpG2vlMunA4A ff5mk6eNaQwEJ1m3RsUFQjDJm04Tz79y4np2imZn8IBSGJntG05InBn7W9TxsMk41a+F CW9oYg5vAPxl4n2m0fkpx3t8da3SWojEv0p3KZp8SflmqIxWQ9dmhVs8+5AxbTFtzPT9 0v47Ak7laVR54RzHoHREUuhNLE3aJ1WW5TuEwOuDtNELDriL2pcdAg5c0ke/k9x6Mp1l oDCfhiLQsc2aIucbxlwf/rw7+2yX3M7xJ2sAEz4Rb2FUtXNQnsswTbR5yGvxdPxRX3c0 2CgA== MIME-Version: 1.0 X-Received: by 10.55.21.40 with SMTP id f40mr43478338qkh.96.1426004286179; Tue, 10 Mar 2015 09:18:06 -0700 (PDT) Received: by 10.96.187.72 with HTTP; Tue, 10 Mar 2015 09:18:05 -0700 (PDT) Received: by 10.96.187.72 with HTTP; Tue, 10 Mar 2015 09:18:05 -0700 (PDT) In-Reply-To: References: Date: Tue, 10 Mar 2015 09:18:05 -0700 Message-ID: Subject: Re: Plugin Post Install Script From: Steven Gill To: dev@cordova.apache.org Content-Type: multipart/alternative; boundary=001a1147d3eaed11060510f17e3a X-Virus-Checked: Checked by ClamAV on apache.org --001a1147d3eaed11060510f17e3a Content-Type: text/plain; charset=ISO-8859-1 Alright. Punted for now. Too early to talk about this. On Mar 10, 2015 8:56 AM, "Michal Mocny" wrote: > I don't think this is a good idea, but I'm open to be convinced. > > However, cannot we punt this discussion for now? The current phase 1 > rollout does not actually have us installing plugins to node_modules, so > really this is an independant feature request to create a new workflow. I > don't see the benefit for this reason alone. I think supporting plugins / > platforms / tolling inside node_modules *is* a good idea, but I think it > should look even more radically different (can demo some ideas next > Hangout). > > -Michal > > On Mon, Mar 9, 2015 at 9:59 PM, Steven Gill > wrote: > > > On Mon, Mar 9, 2015 at 6:20 PM, Jesse wrote: > > > > > What does `npm i -g cordova-plugin-device` do? Just because things are > > > similar does not mean you should force them to be the same. I don't > > really > > > see a benefit in doing this though, and I think we are going to end up > > with > > > circular unresolvable dependencies. or at least greatly increased > > > complexity in dependency resolution. > > > > > > I figure the post install script would fail if the plugin gets > installed > > globally. I'd like to figure out exactly what dependency issues we would > > run into. > > > > Having 2 ways to do things just makes it harder for us .... > > > > > > Thinking outloud ... isn't the post install really just something like: > > > > > > ../../cordova plugin add npm_modules/cordova-plugin-device/ > > > That assumes no dependency resolution ... which would make it explode. > > > > > > This could potentially be one way of doing it. Another way would be to > > move install logic into the script itself. Just thinking outloud. > > > > > > > Overall, I don't think the feature is worth the complexity it would > add, > > > and I don't even think it makes things easier for users. > > > What is the benefit of typing 'npm i cordova-plugin-device' vs 'cordova > > > plugin add cordova-plugin-device' ? Character count? > > > > > > It is definitely early for me to bring up this suggestion. I don't see > a > > reason why current cordova devs would use `npm install > > cordova-plugin-device` over cordova plugin add. I see it being more > useful > > in a world where cordova projects are node projects. CLI created projects > > would have a package.json, and I could see users installing plugins via > npm > > install. > > > > Also, I see cordova JSAPI based projects becoming more popular once we > > break cordova-lib into smaller scripts and offer alternative ways to > build > > and manage projects using npm/gulp/grunt/etc. This should be beneficial > to > > our many downstreams as well. > > > > Just wanting to start fleshing out what all of this will look like. If we > > do decide to go down this route, it would be nice to figure it out soon > so > > we could start getting plugin authors to make updates while we wait for > > tooling. > > > > > > > > > > > @purplecabbage > > > risingj.com > > > > > > On Mon, Mar 9, 2015 at 5:36 PM, Steven Gill > > > wrote: > > > > > > > I think it is worth exploring a generic post install script plugin > > > authors > > > > could include that would install the plugin into a cordova project > > after > > > a > > > > npm install. I haven't had any time to actually explore this yet > > though. > > > > > > > > My initial reaction was that it would be hard to get right. After > some > > > > thought and discussion with the npm people & Anis, it might be a > really > > > > nice way of doing it. > > > > > > > > It would be pretty sweet if people could just go `npm i > > > > cordova-plugin-device` and have it install the plugin into their > > cordova > > > > projects. > > > > > > > > The script would have to: > > > > * detect if it is a cordova project and what version > > > > * do everything plugin install does now > > > > > > > > Just wanted to collect some feedback, advice, and concerns people > have > > > > before I attempt to build it. > > > > > > > > > > --001a1147d3eaed11060510f17e3a--