You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/08/08 16:20:20 UTC

[jira] [Commented] (CB-11412) Update template implementation in cordova create --template

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

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

Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/612#discussion_r73905774
  
    --- Diff: www/_data/redirects.yml ---
    @@ -348,6 +348,7 @@ docs-global:
         "guide_appdev_privacy_index.md.html": "guide/appdev/privacy/index.html"
         "guide_appdev_whitelist_index.md.html": "guide/appdev/whitelist/index.html"
         "guide_cli_index.md.html": "guide/cli/index.html"
    +    "guide_cli_template.md.html": "guide/cli/template.html"
    --- End diff --
    
    Did this link exist in the past? If not, the redirect isn't necessary.


> Update template implementation in cordova create --template
> -----------------------------------------------------------
>
>                 Key: CB-11412
>                 URL: https://issues.apache.org/jira/browse/CB-11412
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CordovaLib
>            Reporter: Caryn Tran
>            Assignee: Caryn Tran
>
> https://github.com/cordova/cordova-discuss/pull/49
> Sometimes we do want a `package.json` copied over. `package.json` could have build scripts that are essential for the template to work. To handle this use case, template authors are suggested to put template files in a subdirectory and point to that subdirectory in index.js. All files in the subdirectory are copied over.
> Update the current template implementation to ignore the list of files above that shouldn't be copied over when using `--template`. If a subdirectory is used, copy the entire contents of the subdirectory.
> If a `package.json` exists in the subdirectory, we should update its fields like we do to `config.xml`. https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/create.js#L378-L382. Only field to update in `package.json` should be `package.name`. `package.name` should be updated to use `config.name` lowercased (npm package names have to be lowercase). `config.name` is the optional third argument `cordova create` takes.



--
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