User Tools

Site Tools


quasarversion

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
quasarversion [2026/02/25 13:05] – created tim45tenwaquasarversion [2026/02/25 13:35] (current) tim45tenwa
Line 4: Line 4:
  
 <code> <code>
 +import { readFileSync } from 'node:fs';
 +import { URL } from 'node:url';
 +
 const packageJson = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf-8')); const packageJson = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf-8'));
 +</code>
 +
 +and then add the following to quasar.config.ts in the build section
 +
 +<code>
 +env: {
 +  // Injecting the values
 +  APP_VERSION: packageJson.version,
 +  BUILD_DATE: new Date().toISOString().split('T')[0], // Simple YYYY-MM-DD
 +},
 +</code>
 +
 +Add the following to the pakcage.json, at the end of the scripts section.
 +
 +<code>
 +"release": "npm version patch && git push origin main --tags",
 +"build:prod": "npm run release && quasar build"
 </code> </code>
quasarversion.1772024705.txt.gz · Last modified: by tim45tenwa