No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Some questions about the building process (webpack and cordova)

    Framework
    3
    6
    1389
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bobdylan last edited by

      I use a Windows machine to build cordova for android, and a virtual machine with MacOS to build for ios. The folder ‘src-cordova’ is created automatically when I do ‘quasar build -m cordova -T android’. Then I add some cordova plugins and do the final build.
      For some plugins I also need to do some adjustments in config.xml to get everything right. Is manually adjusting config.xml even a good idea or could this be done in an other way?

      Then I need to build the app for ios. I don’t really like the idea of having to do all the work (plugins and config.xml) on MacOS again. How is this supposed to work? Putting the entire ‘src-cordova’ folder into a version control system seems like a bad idea, when only config.xml really matters. I guess I’m not the only one that is using multiple machines (or developers) to build apps?

      Further, I like the idea (for beginners) of using just quasar to all the building stuff, but at some point you want to be able to do extra things in webpack and cordova. Is this supported or are we supposed to use only quasar ?

      1 Reply Last reply Reply Quote 1
      • rstoenescu
        rstoenescu Admin last edited by rstoenescu

        Hi,

        1. Yes, you can safely edit config.xml. You can safely edit anything inside of src-cordova. It’s just a Cordova project folder that will be used to generate the mobile app. Quasar CLI takes care of filling it with your src content.
        2. You may notice a .gitignore file. This one tells GIT to also ignore folders/files form src-cordova that are of no importance to GIT (and should not be added to version control assets), like: /src-cordova/platforms, /src-cordova/plugins, /src-cordova/www. This is out of the box. So yes, safely add src-cordova to GIT as it will ignore what it shouldn’t be there.
        3. Then, on another machine, you can use same repo. Just run “cordova prepare” from /src-cordova, and it should install all Cordova plugins etc etc. Cordova also uses a package.json to tell this command what to do to initialize.

        Finally, if you want to tweak the Webpack config, there’s quasar.conf.js > build > extendWebpack(cfg). The docs have all necessary info.

        N 1 Reply Last reply Reply Quote 0
        • B
          bobdylan last edited by

          Ok thank you. I’m using SVN for version control though, so I’ll include the src-cordova folder, but put an ignore on ‘platforms’,‘plugins’ and ‘www’ (and ‘node_modules’)

          1 Reply Last reply Reply Quote 0
          • B
            bobdylan last edited by

            Unfortunately I don’t really understand how extendWebpack works. Could this also be used to copy resources to a folder in src-cordova/www using shelljs ? In another (non-Quasar) project I did this in the webpack build script with :

            var shell = require(‘shelljs’);
            shell.mkdir(’-p’, ‘cordova/www/images’);
            shell.cp(’-R’, ‘images/’, ‘cordova/www/images’);

            1 Reply Last reply Reply Quote 0
            • rstoenescu
              rstoenescu Admin last edited by

              If you need to manually copy images to src-cordova, it means you’re doing it all wrong. Take a look here please, a link for how to handle assets (images, etc) - there’s statics and webpack assets: http://quasar-framework.org/guide/app-handling-assets.html

              1 Reply Last reply Reply Quote 0
              • N
                NT @rstoenescu last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post