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

Plugin Support for new cli #839

Closed
christiansmithdeveloper opened this issue Feb 15, 2018 · 7 comments
Closed

Plugin Support for new cli #839

christiansmithdeveloper opened this issue Feb 15, 2018 · 7 comments

Comments

@christiansmithdeveloper

What problem does this feature solve?

Allows user to scaffold a new plugin using the new cli.

What does the proposed API look like?

@yyx990803
Copy link
Member

The simplest plugin just need a package.json and index.js. There's really no need for scaffolding.

@christiansmithdeveloper
Copy link
Author

The main reason i ask is that i wouldve like typescript for it as well as all the other boilerplate you get with the current cli. (i.e unit test, e2e test etc)

@yyx990803
Copy link
Member

You mean a Vue plugin or a CLI plugin?

If it's a Vue plugin you can simply use vue-cli-service build --target lib src/main.js

@christiansmithdeveloper
Copy link
Author

Yeah i mean a vue plugin. I dont understand what you mean though

@christiansmithdeveloper
Copy link
Author

would this be set as main in the package.json file 'dist{{my-project-name}}.umd.min.js '

@lionel-bijaoui
Copy link

This should be in the doc, somewhere, because I wasn't sure it could be done.
--target should be detailed at least.
What does "lib" does differently from "app" ?
Thanks

@xeor
Copy link

xeor commented May 12, 2018

I found some docs on it @ https://github.com/vuejs/vue-cli/blob/dev/docs/build-targets.md

In general, I think building a lib should be more documented. I've been spending too much time now looking the "best" way to start building my own lib. Many of the boilerplate templates and examples out there are massive! After a lot of trial and error, it was vue-cli and changing setting the build-target that did everything I needed..

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

4 participants