You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by dpogue <gi...@git.apache.org> on 2016/07/27 23:33:40 UTC
[GitHub] cordova-lib pull request #468: CB-8978 Add resource-file parsing to config.x...
GitHub user dpogue opened a pull request:
https://github.com/apache/cordova-lib/pull/468
CB-8978 Add resource-file parsing to config.xml
Original JIRA issue https://issues.apache.org/jira/browse/CB-8978
Related to/replaces https://github.com/apache/cordova-lib/pull/214
See also https://github.com/cordova/cordova-discuss/issues/6
This is just the first pass, we'll also need to update the platform API in each platform to actually copy the resource files around on prepare.
This returns the same data structure as the PluginInfo class. To be determined if we think having top-level `resource-file` elements makes sense, it appears that plugin.xml does not support them.
/cc @ktop @jcesarmobile
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dpogue/cordova-lib resource-file
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-lib/pull/468.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 #468
----
commit 552ce1da2932ccf43b2a137c641fcb90a4bfc27b
Author: Darryl Pogue <da...@ayogo.com>
Date: 2016-07-27T23:28:08Z
CB-8978 Add resource-file parsing to config.xml
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib issue #468: CB-8978 Add resource-file parsing to config.xml
Posted by vladimir-kotikov <gi...@git.apache.org>.
Github user vladimir-kotikov commented on the issue:
https://github.com/apache/cordova-lib/pull/468
LGTM \U0001f44d
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib issue #468: CB-8978 Add resource-file parsing to config.xml
Posted by dpogue <gi...@git.apache.org>.
Github user dpogue commented on the issue:
https://github.com/apache/cordova-lib/pull/468
I'm happy to leave out support for top-level `resource-file` tags, since I agree it doesn't really make sense
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib issue #468: CB-8978 Add resource-file parsing to config.xml
Posted by dpogue <gi...@git.apache.org>.
Github user dpogue commented on the issue:
https://github.com/apache/cordova-lib/pull/468
For clarity, "top-level support" means allowing `resource-file` tags that aren't scoped to a particular platform.
i.e.,
```xml
<widget ...>
<resource-file src="foo.xml" target="bar.xml" />
</widget>
```
This would copy `./foo.xml` to `./platforms/ios/bar.xml`, `./platforms/windows/bar.xml`, etc.
It's not clear if there's a use case for files that get copied into every platform.
---
What will definitely be supported is platform-scoped `resource-file` tags:
```xml
<widget ...>
<platform name="android">
<resource-file src="gservice.json" target="google-services.json" />
<resource-file src="icons/notification-mdpi.png" target="res/drawable-mdpi/ic_notification.png" />
</platform>
</widget>
```
This would copy `./gservices.json` to `./platforms/android/google-services.json` and copy `./icons/notification-mdpi.png` to `./platforms/android/res/drawable-mdpi/ic_notification.png`
This does not require files to go under the www folder, the target can be anywhere in the platform directory (same as with plugin `resource-file` tags)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib issue #468: CB-8978 Add resource-file parsing to config.xml
Posted by shazron <gi...@git.apache.org>.
Github user shazron commented on the issue:
https://github.com/apache/cordova-lib/pull/468
@stevengill Can I assume support for this feature is out in the cordova@6.5.0 release?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib issue #468: CB-8978 Add resource-file parsing to config.xml
Posted by ktop <gi...@git.apache.org>.
Github user ktop commented on the issue:
https://github.com/apache/cordova-lib/pull/468
SGTM
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib issue #468: CB-8978 Add resource-file parsing to config.xml
Posted by jcesarmobile <gi...@git.apache.org>.
Github user jcesarmobile commented on the issue:
https://github.com/apache/cordova-lib/pull/468
I think top level might make sense here if it's a file that the IDE needs but not the app (configuration file like google-services.json/plist)
Can the launch images and icons be outside the www folder?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib issue #468: CB-8978 Add resource-file parsing to config.xml
Posted by jcesarmobile <gi...@git.apache.org>.
Github user jcesarmobile commented on the issue:
https://github.com/apache/cordova-lib/pull/468
Then looks good to me, I can't think any example right now where the same file should be needed for all platforms
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib issue #468: CB-8978 Add resource-file parsing to config.xml
Posted by stevengill <gi...@git.apache.org>.
Github user stevengill commented on the issue:
https://github.com/apache/cordova-lib/pull/468
So this is the first step in adding `resource-file`. Future updates to platform API's will use `getFileResources` to do the copying of these files `src`attribute to the `target` attribute.
I'm not sure I like `null` argument for top level `resource-file`. I agree with you that I don't see much value in adding this as top-level. Maybe developers want to copy a top level `json` file? but why not just include it in `www` at that point? Maybe to copy a sensitive file that isn't under version control? I'm reaching a bit here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib pull request #468: CB-8978 Add resource-file parsing to config.x...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/cordova-lib/pull/468
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib issue #468: CB-8978 Add resource-file parsing to config.xml
Posted by dpogue <gi...@git.apache.org>.
Github user dpogue commented on the issue:
https://github.com/apache/cordova-lib/pull/468
Any other input here? Are we in agreement to remove the top-level file copying?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib issue #468: CB-8978 Add resource-file parsing to config.xml
Posted by codecov-io <gi...@git.apache.org>.
Github user codecov-io commented on the issue:
https://github.com/apache/cordova-lib/pull/468
## [Current coverage](https://codecov.io/gh/apache/cordova-lib/pull/468?src=pr) is 80.62% (diff: 100%)
> Merging [#468](https://codecov.io/gh/apache/cordova-lib/pull/468?src=pr) into [master](https://codecov.io/gh/apache/cordova-lib/branch/master?src=pr) will not change coverage
```diff
@@ master #468 diff @@
==========================================
Files 68 68
Lines 5394 5394
Methods 855 855
Messages 0 0
Branches 1040 1040
==========================================
Hits 4349 4349
Misses 1045 1045
Partials 0 0
```
> Powered by [Codecov](https://codecov.io?src=pr). Last update [29382ca...02c558f](https://codecov.io/gh/apache/cordova-lib/compare/29382ca2bf67e17337845feb4360980df99fe3d2...02c558f6abd09b13066740a43dc711a464dd017e?src=pr)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-lib issue #468: CB-8978 Add resource-file parsing to config.xml
Posted by stevengill <gi...@git.apache.org>.
Github user stevengill commented on the issue:
https://github.com/apache/cordova-lib/pull/468
It is! https://cordova.apache.org/news/2017/01/23/tools-release.html
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org