Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated plugin.xml is unformatted #120

Open
janpio opened this issue Apr 29, 2019 · 6 comments
Open

Generated plugin.xml is unformatted #120

janpio opened this issue Apr 29, 2019 · 6 comments

Comments

@janpio
Copy link
Member

janpio commented Apr 29, 2019

plugman create --name cordova-plugin-math --plugin_id cordova-plugin-math --plugin_version 0.0.1
plugman platform add --platform_name windows

results in

<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-math" version="0.0.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android"><name>cordova-plugin-math</name><js-module name="cordova-plugin-math" src="www/cordova-plugin-math.js"><clobbers target="cordova.plugins.cordova-plugin-math" /></js-module><platform name="windows"><js-module name="cordova-plugin-math" src="src/windows/cordova-plugin-math.js"><runs target="" /></js-module></platform></plugin>
@raphinesse
Copy link
Contributor

I am not surprised. I should have burned it instead of beginning to fix it. 😒

@janpio
Copy link
Member Author

janpio commented Apr 29, 2019

I don't think you have caused this - pure coincidence I started looking into this right now after you fixed it up. But I assume it would have been a lot worse without your fixes ;)

@raphinesse
Copy link
Contributor

raphinesse commented Apr 29, 2019

Proceed with caution, rant ahead

Nah, I'm pretty sure I'm not responsible for this bug. I just wanted to express my frustration about how broken plugman actually is. I think it is easily the most broken/outdated piece of s...oftware among the user facing tools. And even if it wasn't so broken, it still doesn't do that many useful things.

We provide a createpackagejson command to add a package.json file to existing plugins that don't have one. While we are using the npm registry as the primary distribution channel for plugins. Every plugin on npm has a package.json! But if you create a plugin via create, it of course has no package.json. But that's no problem, we have createpackagejson for that, right?

That's why I meant I shouldn't have begun fixing it. Because if it would still be so broken that it just errored out on nearly everything, people would not waste their time trying to accomplish something useful with it.

@janpio
Copy link
Member Author

janpio commented Apr 29, 2019

Well, young @raphinesse, there were times in Cordova land where this was not true, and I am sure plugman saw those times and lived through them...

If we had a "plugin template" with some documentation, we could actually easily get rid of create and such as described in #118 this is currently not properly documented. Because you have copying some semi outdated plugin template things together is not really worth a tool that you have to fix up first.

The only thing I stumbled over in multiple places, and that maybe might be useful to keep, is install and uninstall, although I don't know yet how that is different from the normal CLI anyway.

So I'm totally fine with getting rid of some stuff here.

@raphinesse
Copy link
Contributor

raphinesse commented Apr 29, 2019

Well, young @raphinesse, there were times in Cordova land where this was not true, and I am sure plugman saw those times and lived through them...

Well, a few years ago, when I, even younger than now, was the one wasting his time trying to do something worthwhile with it, it already was broken beyond repair. It probably was more relevant when Cordova had its own plugin registry.

If we had a "plugin template" with some documentation, we could actually easily get rid of create

💯 Agreed.

The only thing I stumbled over in multiple places, and that maybe might be useful to keep, is install and uninstall, although I don't know yet how that is different from the normal CLI anyway.

I think it's supposed to be used to install plugins when following the platform-centered workflow. Other than that, the library part of these commands, which lives in cordova-lib is also used as part of the plugin (un)installation of Cordova CLI

@janpio
Copy link
Member Author

janpio commented Apr 29, 2019

Ohhhh, that is the other plugman which is actually the same one. 🐒

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants