visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

No default jsDelivr CDN file set #468

Closed rkyoku closed 6 years ago

rkyoku commented 6 years ago

This package doesn't have a default file set. You can set it via jsdelivr, browser, or main field in package.json

paulocoghi commented 6 years ago

@matthewp , I find it interesting to add the "browser" option, so it does not conflict with "index.js" available to node.js environment.

Can I make a PR adding this to package.json?

matthewp commented 6 years ago

Yeah, I suppose so, i'm surprised this was never there before.

paulocoghi commented 6 years ago

Done. Waiting for your approval in https://github.com/visionmedia/page.js/pull/470

paulocoghi commented 6 years ago

@RenaudParis , in the next release the npm package will be updated and the default file will be set for jsdelivr. Thanks!

rkyoku commented 6 years ago

Hi @paulocoghi !

I'm sorry for the preformatted issue comment earlier, it is created automatically by jsDeliver and I did not feeel like modifying it because I didn't know anyrthing intelligent to add :)

Thank you for being so reactive, it is impressive! And great, because I will be able to centralize all my external libs using jsDeliver now :) :) :)

Thanks again!

matthewp commented 6 years ago

This was released in 1.8.4, thanks @paulocoghi!

rkyoku commented 6 years ago

Thanks @matthewp !

rkyoku commented 6 years ago

Hi guyz!

Is it possible to add the minified version to the repo? jsDeliver seems to be unable to provide me with the page/page.min.js file. Or is it a bug with jsDeliver?

When I check the default file in jsDeliver, this is what happens: image

Please advise (whenever you have the time, this is clearly not pressing matters)

Thank you all :)

paulocoghi commented 6 years ago

Thanks for the note, Renaud!

@matthewp , unlike CDN JS, jsDelivr does not provide minified versions automatically. If you want, I set up Rollup to do this.

matthewp commented 6 years ago

Yeah that's cool with me.

rkyoku commented 6 years ago

@paulocoghi @matthewp to be noted that jsDeliver does support automatic minification (as I read in a github issue comment somewhere), so I can load npm/page@1.8.4/page.min.js instead of just npm/page@1.8.4.

However, I can't seem to find how to automate this process (of adding the minified file name to the "require") using their website, which makes it painful if I am to change my dependencies every so often.

That's why I still think it could be great to have a minified version of page.js already inside the repo, as you planned to do.

Let me know what you think!

Cheers,