WIP: new global api install + composition provide + update deps #180
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
This PR is meant for migrating the library to be used in Vue 3.x (is in Work in Progress), the PR set to base
master
but it should be aiming to a/next
branch on the base @shakee93 so both2.x
and3.x
solutions coexist in the same repo. If this branch is created I will change the destination of the PRShould close #179
Basic changes:
vue-toasted/index.js
:Now instead of Vue, the
app
instance is passed so it will work with the newcreateApp
, and the global property will be available onthis
by usingapp.config.globalProperties.$toasted
referenceIn Vue 3.x plugins will leverage
provide
andinject
internally and expose a composition function.To do that I add a
useApi.js
for the use of the library along with the Composition API reference:So now, in any setup method or composition function we can do:
To support the last release candidate vue
3.0.0-rc.9
I needed to update several packages from the package.json, this is causing errors in the webpack build process, especially with the uglify plugin:If someone from the core team is available to help me out with this I think is ready to be used (already tested as a submodule in a personal project).
Feel free to contact me directly if needed.
Happy Coding