From f6f6f105549b6240abe0ad575642f33175de0f9f Mon Sep 17 00:00:00 2001 From: Max Goldman Date: Sat, 9 Oct 2021 19:44:07 -0400 Subject: [PATCH] Include repo link in generated banners --- webpack.config.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index f255aa5..c97c636 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,9 +6,12 @@ const webpack = require("webpack"); const pkg = require("./package.json"); const pkglock = require("./package-lock.json"); +const repo = pkg.repository.replace("github:", "https://github.com/"); const abs = (f) => path.resolve(__dirname, f); +const banner = `${pkg.version}\n${pkg.homepage}\n${repo}`; + module.exports = [ { entry: ["./src/index.js"], @@ -41,7 +44,7 @@ module.exports = [ }, }, plugins: [ - new webpack.BannerPlugin(`Snapdown ${pkg.version}\n${pkg.homepage}`), + new webpack.BannerPlugin(`Snapdown ${banner}`), new webpack.DefinePlugin({ ELK_WORKER_URL: `"https://unpkg.com/elkjs@${pkglock.dependencies.elkjs.version}/lib/elk-worker.min.js"`, }), @@ -78,7 +81,7 @@ module.exports = [ }, }, plugins: [ - new webpack.BannerPlugin(`Snapdown ${pkg.version}\n${pkg.homepage}`), + new webpack.BannerPlugin(`Snapdown App ${banner}`), new webpack.DefinePlugin({ ELK_WORKER_URL: `"https://unpkg.com/elkjs@${pkglock.dependencies.elkjs.version}/lib/elk-worker.min.js"`, }),