Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Unpkg full paths



  • @Fran-Diox @argelius I saw recently that Onsen is on unpkg.com. It is my understanding to always grab the most current version of OnsenUI JS, you link to: https://unpkg.com/onsenui but what do you link to in order to grab all the CSS?

    I ask because I want to update my help template where I don’t have to keep updating it to the current build. Currently, I give people this:

    <link rel="stylesheet" href="https://cdn.rawgit.com/OnsenUI/OnsenUI-dist/2.0.4/css/onsenui.css" type="text/css" media="all" />
        <link rel="stylesheet" href="https://cdn.rawgit.com/OnsenUI/OnsenUI-dist/2.0.4/css/onsen-css-components.css">
        <script src="https://cdn.rawgit.com/OnsenUI/OnsenUI-dist/2.0.4/js/onsenui.js"></script>
    

    And I would like to go to (or whatever is needed):

    <link rel="stylesheet" href="https://unpkg.com/onsenui/css/???????????">
    <link rel="stylesheet" href="https://unpkg.com/onsenui/css/???????????">
    <script src="https://unpkg.com/onsenui"></script>
    

  • Onsen UI

    @munsterlander If you append a / at the end of the URL you will see the files and directories: https://unpkg.com/onsenui@2.0.4/

    Basically it’s the same path that you are already using : /css/onsen-css-components.css & /css/onsenui.css



  • @Fran-Diox I saw that, but was unsure how it would resolve as I saw with just onsenui it auto resolved to the most current build. Apparently, I didn’t test well enough! Doh! Thanks! Got this working now.


  • Onsen UI

    @munsterlander That’s a feature in unpkg. If you don’t specify version it redirects to the latest version. You can always specify it with onsenui@2.0.3 for example.



  • @Fran-Diox Thanks! Yeah, I didn’t know if it would auto resolve to the latest version once I put stuff after the / to access the CSS. I have updated my github and also launched a CodePen account to now centralize all of the forum examples and answers. For whatever reason, I can’t mark this topic as solved.