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.

Examples for wrapping up vanilla javascript responsive web app?

  • Hi,
    I thought to use onsen because it allows to use vanilla js.
    I have already built a responsive web app visualising connected graphs.

    The app is built using flask; I use the same index.html for all the routes, so I should be able to adjust to a single web page quite straightforwardly.

    The front-end uses only GET APIs to visualise and expand connected graphs on demand - adding SVG elements.

    Could you provide examples on how I could simply wrap up all the javascript code I wrote (about 5K lines) and the html structure, without refactoring in components and templates ?
    The page makes use of jquery, hammerjs, materializecss and visualisation libraries.

    The app is already working as a responsive web-site: I would like to avoid refactoring the code ( eventually wrap up everything as a “graph” component ) and ship it to mobile app stores as a free app asap, as first pilot test.

  • Onsen UI

    @gg4u I’m not sure what you mean by “without refactoring in components and templates”, do you have your 5k lines in one single file?

    Anyway I’d suggest you use Monaca. You can use the CLI to start a minimum project, just open the command line and runnpm install -g monaca followed by monaca create "your_project_name" and select Onsen UI and Onsen UI V2 JS Minimum. From there you can just add your HTML and link to your JS files and libraries in the www/index.html file.

    Sorry if this is not what you’re looking for.