Closed NicksonYap closed 5 years ago
It looks like an issue with unpkg file resolution.
https://unpkg.com/popoto is supposed to resolve to https://unpkg.com/popoto@latest/dist/popoto.min.js
using "unpkg"
deafult parameter from package.json but it seems it's no more the case.
I'll see what I can do to improve this.
unpkg/unpkg.com/issues/156
I'm looking if I should change the dependencies references in project to avoid this kind of issue.
Why don't we use webpack and "npm install" the package?
I want the examples to be hosted directly in GitHub Pages of the project.
As they are statics HTML and JavaScript I just had to turn on the feature on the master branch and every examples can be tested directly with its live url. example: https://nhogs.github.io/popoto-examples/simple-graph/index.html
Using services like unpkg or jsDelivr is an easy way to always references latest version of dependencies on client side.
One possibility would be to host dependencies in the project but trigger a new build on every new releases of a dependency. It is more complex to setup.
But you are right that I can create a NPM package of this project in order to run it locally. Would it be useful for you?
I think the versions of dependancies should not be updated automatically to avoid breaking the examples
Also this will allow running fully in local host.
I think it'e just more proper & reliable to host dependacies ourselves, especially when tools like npm & webpack is built for this
Most projects now use webpack and nom anyways so it'll be easier to integrate
On Thu, 20 Dec 2018, 8:45 pm Popoto.js <notifications@github.com wrote:
I want the examples to be hosted directly in GitHub Pages https://pages.github.com/ of the project.
As they are statics HTML and JavaScript I just had to turn on the feature on the master branch and every examples can be tested directly with its live url. example: https://nhogs.github.io/popoto-examples/simple-graph/index.html
Using services like unpkg https://unpkg.com/popoto/ or jsDelivr https://www.jsdelivr.com/package/npm/popoto is an easy way to always references latest version of dependencies on client side.
One possibility would be to host dependencies in the project but trigger a new build on every new releases of a dependency. It is more complex to setup.
But you are right that I can create a NPM package of this project in order to run it locally. Would it be useful for you?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Nhogs/popoto-examples/issues/16#issuecomment-448987181, or mute the thread https://github.com/notifications/unsubscribe-auth/AFIae-4pYDv5S_be0zXbavlNQfbwBNXaks5u64ZagaJpZM4ZY-nA .
I chose the easy solution to store the dependencies dist in repo and reference them locally to avoid new version breakage.
This solution works well on gh-pages and locally
https://nhogs.github.io/popoto-examples/factual/index.html
It seems to have failed to load resource: https://unpkg.com/materialize-css@1.0.0-rc.2/index.js
-- Edit:
It seems all the Live Examples are Broken (only see a blue-gray page)