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 C7DF019A96 for ; Wed, 16 Mar 2016 05:26:33 +0000 (UTC) Received: (qmail 81742 invoked by uid 500); 16 Mar 2016 05:26:33 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 81716 invoked by uid 500); 16 Mar 2016 05:26:33 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 81701 invoked by uid 99); 16 Mar 2016 05:26:33 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Mar 2016 05:26:33 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 706C12C1F56 for ; Wed, 16 Mar 2016 05:26:33 +0000 (UTC) Date: Wed, 16 Mar 2016 05:26:33 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-10808) cordova template should have api to specify directory name with template content 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-10808?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D151967= 88#comment-15196788 ]=20 ASF GitHub Bot commented on CB-10808: ------------------------------------- Github user stevengill commented on the pull request: https://github.com/apache/cordova-lib/pull/410#issuecomment-197159034 =20 still working on integrating it into the template work, but will add it soon to the pr. =20 On Tue, Mar 15, 2016 at 8:00 PM, Carlos Santana wrote: =20 > @stevengill the npm install portion i= s > reverted now, I will take a look at your PR for npm fetch on how is > handling the template fetching and npm install. > > =E2=80=94 > You are receiving this because you were mentioned. > Reply to this email directly or view it on GitHub > > > cordova template should have api to specify directory name with template = content > -------------------------------------------------------------------------= ------- > > Key: CB-10808 > URL: https://issues.apache.org/jira/browse/CB-10808 > Project: Apache Cordova > Issue Type: Improvement > Components: CLI > Reporter: Carlos Santana > Assignee: Carlos Santana > Fix For: Master > > > When creating an app using a template from npm like: > cordova create myapp --template my-cool-cdv-template > App is created with content of root of the npm pacakge. > By doing this all files are copied from the template. > In some cases some files are not desire to end up in the new app, files t= hat are related to testing, packaging, source control, etc.. > Some files are: > package.json > And some time you want the new app to have a package.json provided by the= template but not the template's pacakge.json > We should implement same way we do cordova-app-hello-world npm package > main module exports an object with a property dirname > Example: > Content of package.tgz from npm > package.json > lib/ > .gitignore > template_content/ > template_content/package.json > template_content/www > template_content/config.xml > index.js > Content of package.json > { > "name": "my-cool-cdv-template", > "main": "./index.js" > } > Content of index.js: > path=3Drequire('path'); > module.exports =3D { > "dirname": path.join(__dirname,'template_content') > } > This also allows to run npm install after copying the template files and = the template deliverable included a package.json, for example to have dev t= ools and scripts to be install for the development of the cordova app. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org