Skip to content

Commit

Permalink
Include repo link in generated banners
Browse files Browse the repository at this point in the history
  • Loading branch information
maxg committed Oct 9, 2021
1 parent b7f908e commit f6f6f10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down Expand Up @@ -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"`,
}),
Expand Down Expand Up @@ -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"`,
}),
Expand Down

0 comments on commit f6f6f10

Please sign in to comment.