Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ jobs:
- name: Check formatting
run: npm run format-check

- name: Build project
run: npm run build

- name: Install jq
run: sudo apt-get update && sudo apt-get install -y jq

Expand All @@ -68,6 +65,21 @@ jobs:
run: |
echo "Version: '${{ steps.version.outputs.version }}'"

- name: Build project for Current Dir
run: npm run build --qPublicBasePath=app/current/excel

- name: Release to current dir
run: |
# Update current
rm -rf "docs/app/current/excel"
mkdir -p "docs/app/current/excel"
cp -r dist/spa/* "docs/app/current/excel/"

- name: Build project for Version Dir
run: |
VERSION=${{ steps.version.outputs.version }}
npm run build --qPublicBasePath=app/$VERSION/excel

- name: Release to version dir
run: |
VERSION=${{ steps.version.outputs.version }}
Expand All @@ -79,13 +91,6 @@ jobs:
# Copy dist/spa to docs/app/version/excel
cp -r dist/spa/* "docs/app/$VERSION/excel/"

- name: Release to current dir
run: |
# Update current
rm -rf "docs/app/current/excel"
mkdir -p "docs/app/current/excel"
cp -r dist/spa/* "docs/app/current/excel/"

- name: Commit and push changes
env:
PUSH_BRANCH: ${{ github.event.workflow_run.head_branch || github.ref_name }}
Expand Down
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

31 changes: 27 additions & 4 deletions quasar.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,37 @@
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-file

import { defineConfig } from "#q-app/wrappers";
import { isNullOrWhitespace } from "./src/util/string_util";
import packageSpec from "./package.json";

// import checker from "vite-plugin-checker";
// import vueDevTools from "vite-plugin-vue-devtools";

const FLAG_ENABLE_VUE_DEV_TOOLS: boolean = false;
const FLAG_ENABLE_VUE_DEV_TOOLS: boolean = false as const;

const PUBLIC_BASE_PATH: string = "/";
function resolvePublicBasePath(): string {
let p = process.env.Q_PUBLIC_BASE_PATH;

if (isNullOrWhitespace(p)) {
// npm exposes `npm_config_*` env vars for `npm run build -- --publicPath=/foo`
p = process.env.npm_config_qpublicbasepath;
}

if (isNullOrWhitespace(p)) {
p = "/";
}

// Ensure we always have a leading slash for Vite's base path resolution
p = p && p.startsWith("/") ? p : `/${p}`;

if (p !== "/") {
console.log(`Q_PUBLIC_BASE_PATH is '${p}'`);
}

return p;
}

const Q_PUBLIC_BASE_PATH: string = resolvePublicBasePath();

export default defineConfig((ctx) => {
console.log("\nquasar.config.ts: defineConfig(..): QuasarContext >>", ctx, "<< QuasarContext");
Expand Down Expand Up @@ -70,7 +93,7 @@ export default defineConfig((ctx) => {

// rebuildCache: true, // rebuilds Vite/linter/etc cache on startup

publicPath: PUBLIC_BASE_PATH,
publicPath: Q_PUBLIC_BASE_PATH,
// analyze: true,
env: {
PACKAGE_NAME: packageSpec.name,
Expand Down Expand Up @@ -201,7 +224,7 @@ export default defineConfig((ctx) => {
// manifestFilename: 'manifest.json',
extendManifestJson(json: unknown) {
(json as Record<string, string>).short_name = packageSpec.productName;
(json as Record<string, string>).start_url = PUBLIC_BASE_PATH;
(json as Record<string, string>).start_url = Q_PUBLIC_BASE_PATH;
},
// useCredentialsForManifestTag: true,
// injectPwaMetaTags: false,
Expand Down