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

    How-to question: Where to put commonly used .js files in Quasar directory structure?

    Help
    2
    2
    521
    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.
    • M
      Mickey58 last edited by Mickey58

      I’m studying the directory structure for Quasar projects at https://quasar.dev/quasar-cli/cli-documentation/directory-structure .

      I’m wondering about the following simple question: As part of my app, I have developed quite a few commonly used .js files, which contain things like constant definitions, helper functions, data structures to be loaded, etc…

      Almost all of these files are Node modules, exporting stuff. Those are imported both by my Quasar components in \src\pages and by MyLayout.vue in \src\layouts.

      What is the recommended way where to put those files in the directory structure? I’m aware I can always add new sub-folders under \src, but is there a convention/best practice to follow for such sources?

      1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman last edited by

        @Mickey58 i would say none, it’s for devs to decide how they structure other files and folders of their project. you can register an alias for sub-folders you create for easy imports https://quasar.dev/quasar-cli/cli-documentation/handling-webpack#Adding-Webpack-aliases.

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