-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
40 lines (37 loc) · 1.13 KB
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const { gitDescribeSync } = require("git-describe");
process.env.VUE_APP_GIT_HASH = gitDescribeSync().semverString;
console.log("Downloading latest installer...");
const axios = require("axios");
const fs = require("fs");
axios
.get(
`https://api.github.com/repos/${process.env.INSTALLER_REPOSITORY}/releases/latest`
)
.then(releaseData => {
axios
.get(releaseData.data.assets[0].browser_download_url, {
responseType: "stream"
})
.then(installerFile => {
const file = fs.createWriteStream("public/installerBase.exe");
installerFile.data.pipe(file);
console.log("Installer download complete");
});
})
.catch(console.log);
module.exports = {
pages: {
index: {
canonicalurl: process.env.CANONICAL_URL,
// entry for the page
entry: "src/main.js",
// the source template
template: "public/index.html",
// output as dist/index.html
filename: "index.html"
}
},
css: {
sourceMap: true
}
};