cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10808) cordova template should have api to specify directory name with template content
Date Mon, 14 Mar 2016 16:23:33 GMT

    [ https://issues.apache.org/jira/browse/CB-10808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15193564#comment-15193564
] 

ASF GitHub Bot commented on CB-10808:
-------------------------------------

GitHub user csantanapr opened a pull request:

    https://github.com/apache/cordova-lib/pull/410

    CB-10808 **CLI** Should handle templates with files located in sub directory

    Refer to [CB-1080](https://issues.apache.org/jira/browse/CB-10808) for more info


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/csantanapr/cordova-lib CB-10808

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-lib/pull/410.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #410
    
----
commit e77d71d1d617173e8406ff581332f96845bfd01a
Author: Carlos Santana <csantana23@gmail.com>
Date:   2016-03-14T16:17:58Z

    CB-10808 **CLI** __src__ Support templates with subdirectory

commit 0f767439949e97de91fc0e26d90f4a7426a05122
Author: Carlos Santana <csantana23@gmail.com>
Date:   2016-03-14T16:18:14Z

    CB-10808 **CLI** __test__ Support templates with subdirectory

----


> 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
>
> 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 that 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=require('path');
> module.exports = {
>    "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 tools 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


Mime
View raw message