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

    What is best practice for boot file dependencies

    Help
    2
    2
    212
    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.
    • DarkLite1
      DarkLite1 last edited by

      As you have noticed already I’m pretty new to javaScript and the Quasar Framework. Currently I’m implementing msal in my project. All is working fine but I’m a bit concerned about the folder structure I used.

      So, in the Quasar docs for boot files it says:

      With boot files, it is possible to split each of your dependencies into self-contained, easy to maintain files.

      My project structure currently looks like this:

      /src/boot
      /src/boo/auth.js // add msal to Vue.prototype
      /src/boot/auth // FOLDER
      /src/boot/auth/authIndex.js // instantiates the msal object
      /src/boot/auth/authPopup.js // msal popup functions
      /src/boot/auth/authRedirect.js // msal redirect functions
      
      /src/config
      /src/config/authConfig.js // confg settings
      /src/config/graphConfig.js
      

      As there is a sub folder in the “/src/boot” folder I was wondering if this is ok? How do other people handle this? Is there a better/cleaner way? What are the best practices?

      Thank you for any advice you might have.

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        AFAIK, there are no real “best practice” with boot files except general JavaScript module practices. Keep em small and manageable i.e. modules should follow SRP. Sounds like you are doing the right thing from what I can tell. 🙂 The only other thing I might suggest is, and it depends on what your authIndex.js file is doing, but to call it just index.js. That is a usual practice in the JS world.

        Anyone else have a tip or two?

        Scott

        1 Reply Last reply Reply Quote 0
        • First post
          Last post