[solved] Should quasar.extensions.json file be checked in VCS / GIT despite is it modified by extensions?
-
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
-
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
-
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" } } } } }
-
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)
-
My suggestion is to not do your own formatting as the file is generated - leave as-is
-
Ok, thank you
So,
quasar.extensions.json
should be:- checked in VCS
- let unformatted