Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Can you please provide more documentation about using the plugin with a real life example ? #23

Open
msalahz opened this issue Apr 23, 2019 · 11 comments

Comments

@msalahz
Copy link

msalahz commented Apr 23, 2019

Can you please provide more documentation about using the plugin with a real life example ? the plugin can use more documentation at least in the README file.

@chopfitzroy
Copy link
Contributor

Hey @msalahz,

Could you explain where you are having issues, after running vue add p11n I found the generated folder structure to be quite clear, maybe if we had a better idea what is not clear I (or you) could submit a PR to make things easier.

@msalahz
Copy link
Author

msalahz commented Apr 23, 2019

Hi @CrashyBang,
I'm trying to plugnize my tool as well, and I can confirm the running vue add p11n is working as expected, but I can't figure out the following points :

  • How I can specify that a dependency x should be bundled during plugin build ? all dependancies are excluded from the build by default.
  • When I built the plugin using yarn build then tried to test it locally by installing my-plugin yarn add file:path/to/my-plugin then try to invoke it vue invoke my-plugin I get the following error
Error: Cannot resolve plugin my-plugin from package.json. Did you forget to install it?
Error: Cannot resolve plugin my-plugin from package.json. Did you forget to install it?
    at invoke (/Users/msz/.config/yarn/global/node_modules/@vue/cli/lib/invoke.js:73:11)
    at module.exports.args (/Users/msz/.config/yarn/global/node_modules/@vue/cli/lib/invoke.js:188:10)
    at Command.program.command.description.option.allowUnknownOption.action (/Users/msz/.config/yarn/global/node_modules/@vue/cli/bin/vue.js:94:29)
    at Command.listener (/Users/msz/.config/yarn/global/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:197:13)
    at Command.parseArgs (/Users/msz/.config/yarn/global/node_modules/commander/index.js:654:12)
    at Command.parse (/Users/msz/.config/yarn/global/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/Users/msz/.config/yarn/global/node_modules/@vue/cli/bin/vue.js:226:9)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)

So I'm not sure if i'm doing the right thing or not.

Can you advice ?

@chopfitzroy
Copy link
Contributor

Hey @msalahz,

Okay your first issue sounds like it is related to #22 which I am actually working on and hope to have merged into the master branch soon.

As for your second issue, are you trying to add your own module to the tool you are trying to plugnize or do you mean you are trying to add the plugnized tool to another project you are working on?

Cheers.

@msalahz
Copy link
Author

msalahz commented Apr 23, 2019

Hi @CrashyBang,

As for your second issue, are you trying to add your own module to the tool you are trying to plugnize or do you mean you are trying to add the plugnized tool to another project you are working on?

I'm trying to add the plugnized tool to another project that i'm working on.

@chopfitzroy
Copy link
Contributor

Hey @msalahz,

I am not sure on this one, does this issue only happen with plugnized tools? For example if you were to create another module my-other-module and yarn add ../path/to/my-other-module does that work? Just trying to figure out where the issue is coming from.

@msalahz
Copy link
Author

msalahz commented Apr 23, 2019

I'm working on plugin now @CrashyBang to know that. Will keep you updated.

@msalahz
Copy link
Author

msalahz commented Apr 23, 2019

BTW @CrashyBang installing my-plugin is working fine, I'm getting this error when I try to invoke it

@chopfitzroy
Copy link
Contributor

Hey @msalahz,

Are you tying to create a cli plugin? I ask because that is what invoke is for.

If you are trying to create a cli plugin I am not sure this project is going to help you (although it would be best to confirm with @kazupon) from what I understand this project is intended to help plugnize front end type modules, for example I am using it to create a portable search box plugin at work.

It is probably worth highlighting this in the README to help avoid confusion.

@msalahz
Copy link
Author

msalahz commented Apr 23, 2019

yes @CrashyBang , I'm trying to create a cli plugin like Vuetify.
This is what already mentioned here by @kazupon

@chopfitzroy
Copy link
Contributor

Hey @msalahz,

I think it would be best to wait for @kazupon to comment as I am not 100% sure and would not want to mislead you.

@msalahz
Copy link
Author

msalahz commented Apr 25, 2019

@kazupon : Looks like the current build doesn't support JSON import, Can you confirm ?

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

No branches or pull requests

2 participants