Skip to content

Commit

Permalink
Merge pull request #12 from center-for-threat-informed-defense/cti-au…
Browse files Browse the repository at this point in the history
…thoring-tool-patches

CTI Authoring Tool v1.0.0 Release Patches
  • Loading branch information
mehaase authored Jun 15, 2023
2 parents 3e5183e + 7e3887c commit a9a013b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
env:
# Workaround for node.js bug: https://github.com/webpack/webpack/issues/14532
NODE_OPTIONS: "--openssl-legacy-provider"
VUE_APP_GOOG_ANALYTICS_TAG: "G-67S8JX925T"
run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
4 changes: 4 additions & 0 deletions src/cti_authoring_tool/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<% if(process.env.VUE_APP_GOOG_ANALYTICS_TAG) { %>
<script async src="https://www.googletagmanager.com/gtag/js?id=<%=process.env.VUE_APP_GOOG_ANALYTICS_TAG%>"></script>
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config',<%=`"${ process.env.VUE_APP_GOOG_ANALYTICS_TAG }"`%>);</script>
<% } %>
</head>
<body>
<noscript>
Expand Down
3 changes: 3 additions & 0 deletions src/cti_authoring_tool/src/assets/configuration/app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exports.default = {
title: "Authoring Tool - CTI Blueprints"
}
17 changes: 16 additions & 1 deletion src/cti_authoring_tool/vue.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const path = require("path");
const Configuration = require("./src/assets/configuration/app.config");

module.exports = {
publicPath: './',
configureWebpack: {
Expand All @@ -7,5 +9,18 @@ module.exports = {
"~": path.resolve(__dirname, "./")
}
}
},
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
// Merge app configuration
args[0] = {
...args[0],
...Configuration.default
}
// Return args
return args;
});
}
};
};

0 comments on commit a9a013b

Please sign in to comment.