Add signature and fix paths
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8494041edd
commit
93f1b8ffe9
3 changed files with 34 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
|
@ -31,6 +32,8 @@ steps:
|
|||
image: node
|
||||
commands:
|
||||
- yarn build
|
||||
environment:
|
||||
SUBPATH: /${DRONE_COMMIT_SHA:0:8}
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
|
@ -44,6 +47,8 @@ steps:
|
|||
image: node
|
||||
commands:
|
||||
- yarn build
|
||||
environment:
|
||||
SUBPATH: /pr-${DRONE_PULL_REQUEST}
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
|
@ -140,3 +145,7 @@ volumes:
|
|||
- name: cache
|
||||
host:
|
||||
path: /opt/gitea/drone-cache/hamcha/tghandbook
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: fade536706bcf207d4cf35663c985e3f457b957b743519f19fbb696549cf07f3
|
||||
|
|
24
build.js
Normal file
24
build.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* eslint-disable */
|
||||
const Bundler = require("parcel-bundler");
|
||||
const Path = require("path");
|
||||
|
||||
const entryFiles = Path.join(__dirname, "./index.html");
|
||||
|
||||
// Bundler options
|
||||
const options = {
|
||||
outDir: "./dist",
|
||||
outFile: "index.html",
|
||||
publicUrl: process.env.SUBPATH,
|
||||
watch: false,
|
||||
contentHash: false,
|
||||
scopeHoist: false,
|
||||
target: "browser",
|
||||
logLevel: 3, // 5 = save everything to a file, 4 = like 3, but with timestamps and additionally log http requests to dev server, 3 = log info, warnings & errors, 2 = log warnings & errors, 1 = log errors, 0 = log nothing
|
||||
sourceMaps: true, // Enable or disable sourcemaps, defaults to enabled (minified builds currently always create sourcemaps)
|
||||
autoInstall: true, // Enable or disable auto install of missing dependencies found during bundling
|
||||
};
|
||||
|
||||
(async () => {
|
||||
const bundler = new Bundler(entryFiles, options);
|
||||
await bundler.bundle();
|
||||
})();
|
|
@ -6,7 +6,7 @@
|
|||
"scripts": {
|
||||
"dev": "parcel index.html",
|
||||
"lint": "eslint lib",
|
||||
"build": "parcel build index.html"
|
||||
"build": "node ./build.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^3.3.0",
|
||||
|
|
Reference in a new issue