forked from hamcha/tghandbook
Add signature and fix paths
This commit is contained in:
parent
8494041edd
commit
93f1b8ffe9
3 changed files with 34 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
|
@ -31,6 +32,8 @@ steps:
|
||||||
image: node
|
image: node
|
||||||
commands:
|
commands:
|
||||||
- yarn build
|
- yarn build
|
||||||
|
environment:
|
||||||
|
SUBPATH: /${DRONE_COMMIT_SHA:0:8}
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
@ -44,6 +47,8 @@ steps:
|
||||||
image: node
|
image: node
|
||||||
commands:
|
commands:
|
||||||
- yarn build
|
- yarn build
|
||||||
|
environment:
|
||||||
|
SUBPATH: /pr-${DRONE_PULL_REQUEST}
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
@ -140,3 +145,7 @@ volumes:
|
||||||
- name: cache
|
- name: cache
|
||||||
host:
|
host:
|
||||||
path: /opt/gitea/drone-cache/hamcha/tghandbook
|
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": {
|
"scripts": {
|
||||||
"dev": "parcel index.html",
|
"dev": "parcel index.html",
|
||||||
"lint": "eslint lib",
|
"lint": "eslint lib",
|
||||||
"build": "parcel build index.html"
|
"build": "node ./build.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^3.3.0",
|
"@typescript-eslint/eslint-plugin": "^3.3.0",
|
||||||
|
|
Loading…
Reference in a new issue