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

    [solved] Should quasar.extensions.json file be checked in VCS / GIT despite is it modified by extensions?

    CLI
    3
    6
    337
    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.
    • D
      dlecan last edited by dlecan

      Hello,

      We are using Quasar CLI to build our application, which works fine.
      We are also generating our icons with Icon Genie, which works great too.

      We have checked in our quasar.extensions.json file into out Git repository in order to share the configuration in the team.
      This file is formatted as any other JS/JSON files in the project with our Prettier configuration.

      But Icon Genie always tries to modify this file, and even there is no modification, the format of the file is different than our.

      Versions:

       Pkg quasar........ v1.8.2
       Pkg @quasar/app... v1.5.2
      

      What is the good strategy about this file, modified by humans but also but the CLI:

      • should we commit it in Git?
      • should we ignore it? How to share the configuration between developers?
      • how to ignore Icon Genie reformat if no modification?

      Thank you

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

        What do you mean by “Icon Genie always tries to modify this file”? I’m not sure what the versions are pointing out. Can you show the whole files please (the before and after)?

        It should only modified once at the time of installation of the AE, AFAIK.

        Scott

        1 Reply Last reply Reply Quote 0
        • D
          dlecan last edited by dlecan

          Here are before, and after quasar build -m pwa. It happens sometimes, much more after adding a new NPM dependency (dev or not).

          Before (4-space tabulations, our formatter)

          {
              "@quasar/typescript": {
                  "webpack": "plugin",
                  "rename": true,
                  "vscode": true,
                  "prettier": true
              },
              "@quasar/testing": {
                  "harnesses": ["quality", "security", "security-antivuln"]
              },
              "@quasar/testing-unit-jest": {
                  "babel": "babelrc",
                  "options": ["scripts"]
              },
              "@quasar/testing-quality": {
                  "options": ["scripts"]
              },
              "@quasar/testing-security": {
                  "options": [],
                  "zapbrowser": "Firefox"
              },
              "@quasar/testing-security-antivuln": {},
              "@quasar/icon-genie": {
                  "minify_dev": "pngquant",
                  "minify_build": "optipng",
                  "cordova": {
                      "background_color": "#313A81",
                      "splashscreen_type": "pure"
                  },
                  "build_always": false,
                  "__internal": {
                      "dev": {
                          "pwa": {
                              "iconHash": "bb...61"
                          },
                          "spa": {
                              "iconHash": "bb...61"
                          }
                      },
                      "build": {
                          "pwa": {
                              "iconHash": "bb...61"
                          },
                          "spa": {
                              "iconHash": "bb...61"
                          }
                      }
                  }
              }
          }
          

          After (2-space tabulations, another formatter)

          {
            "@quasar/typescript": {
              "webpack": "plugin",
              "rename": true,
              "vscode": true,
              "prettier": true
            },
            "@quasar/testing": {
              "harnesses": [
                "quality",
                "security",
                "security-antivuln"
              ]
            },
            "@quasar/testing-unit-jest": {
              "babel": "babelrc",
              "options": [
                "scripts"
              ]
            },
            "@quasar/testing-quality": {
              "options": [
                "scripts"
              ]
            },
            "@quasar/testing-security": {
              "options": [],
              "zapbrowser": "Firefox"
            },
            "@quasar/testing-security-antivuln": {},
            "@quasar/icon-genie": {
              "minify_dev": "pngquant",
              "minify_build": "optipng",
              "cordova": {
                "background_color": "#313A81",
                "splashscreen_type": "pure"
              },
              "build_always": false,
              "__internal": {
                "dev": {
                  "pwa": {
                    "iconHash": "bb...61"
                  },
                  "spa": {
                    "iconHash": "bb...61"
                  }
                },
                "build": {
                  "pwa": {
                    "iconHash": "bbccce73eb29c55510bf791d558a0461"
                  },
                  "spa": {
                    "iconHash": "bbccce73eb29c55510bf791d558a0461"
                  }
                }
              }
            }
          }
          
          1 Reply Last reply Reply Quote 0
          • Hawkeye64
            Hawkeye64 last edited by Hawkeye64

            I think Icon Genie uses the persistentConf api. On the first image, you formatted it? Pretty sure quasar app writes it with JSON.stringify(extensions-conf,null,2)

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

              My suggestion is to not do your own formatting as the file is generated - leave as-is

              1 Reply Last reply Reply Quote 1
              • D
                dlecan last edited by dlecan

                Ok, thank you

                So, quasar.extensions.json should be:

                • checked in VCS
                • let unformatted
                1 Reply Last reply Reply Quote 0
                • First post
                  Last post