Skip to content

Commit 41c7068

Browse files
committed
Generate title dynamically for terminusx and local
Fixes issue #23
1 parent 8a953ec commit 41c7068

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

.github/workflows/main_workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
AUTH0_DOMAIN="signup-dev.terminusdb.com"
3333
AUDIENCE="https://terminuscloud/users"
3434
' > .env
35-
npm run build
35+
npm run build-terminusx
3636
- name: Build prod
3737
if: startsWith(github.ref, 'refs/tags/v')
3838
run: |
@@ -46,7 +46,7 @@ jobs:
4646
AUTH0_DOMAIN="signup.terminusdb.com"
4747
AUDIENCE="https://terminuscloud/users"
4848
' > .env
49-
npm run build
49+
npm run build-terminusx
5050
- name: Set up Cloud SDK
5151
uses: google-github-actions/setup-gcloud@v0
5252
with:

packages/tdb-dashboard/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"scripts": {
2323
"build-es6": "rimraf es6 && cross-env NODE_ENV=es6 babel ./src -d es6 --extensions '.js'",
2424
"build": "webpack --mode production",
25+
"build-terminusx": "webpack --mode production --env title=TerminusX",
2526
"start": "webpack serve --mode development --open --progress --port 3030 --host localhost --config ./webpack_dev.config.js --history-api-fallback",
2627
"new": "webpack serve --mode development --open --progress --port 3035 --host localhost --content-base src --inline --config ./webpack_dev.config.js --history-api-fallback",
2728
"demo": "webpack serve --progress --port 3030 --host localhost --content-base demo --inline --config demo/webpack.config.js",

packages/tdb-dashboard/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>TerminusX</title>
4+
<title><%= htmlWebpackPlugin.options.title %></title>
55
<meta charset="UTF-8">
66
<link type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" />
77
<link rel="icon" type="image/png" href="https://assets.terminusdb.com/images/terminusx-color.png"/>

packages/tdb-dashboard/webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module.exports = (env, argv) => ({
1919
new Dotenv({path: path.resolve(__dirname, '.env'), systemvars: true}),
2020
new HtmlWebPackPlugin({
2121
inject: true,
22+
title: env.title ? env.title : "TerminusDB",
2223
template: path.resolve(__dirname, './src/index.html'),
2324
bundleFileName:"tdb-dashboard.min.js"
2425
}),

packages/tdb-dashboard/webpack_dev.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module.exports = {
2323
plugins: [
2424
new HtmlWebPackPlugin({
2525
inject: true,
26+
title: env.title ? env.title : "TerminusDB",
2627
template: path.resolve(__dirname, './src/index.html'),
2728
bundleFileName:"bundle.js"
2829
}),

0 commit comments

Comments
 (0)