From ef0b09bd67a10f943792f4c97edcbfa88d7682c9 Mon Sep 17 00:00:00 2001 From: Andrei Mazol Date: Thu, 26 Nov 2020 17:16:05 +0300 Subject: [PATCH] #97 publish Ketcher to NPM (#115) - update webpack.config.js - update index.html --- example/config/webpack.config.js | 7 ++++--- example/public/index.html | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/example/config/webpack.config.js b/example/config/webpack.config.js index 014f76758f..7a76d05a46 100644 --- a/example/config/webpack.config.js +++ b/example/config/webpack.config.js @@ -8,9 +8,9 @@ const config = require('../../package.json') const HtmlReplaceWebpackPlugin = require('html-replace-webpack-plugin') const GitRevisionPlugin = require('git-revision-webpack-plugin') const gitRevisionPlugin = new GitRevisionPlugin({ - commithashCommand: 'rev-list ' + config.version + '..HEAD --count' + commithashCommand: `rev-list v${config.version}..HEAD --count` }) - +const buildNumber = gitRevisionPlugin.commithash() module.exports = override( addBundleVisualizer({}, true), addWebpackModuleRule({ @@ -24,7 +24,8 @@ module.exports = override( new HtmlReplaceWebpackPlugin([ { pattern: '@@version', - replacement: gitRevisionPlugin.commithash() + replacement: + 'v' + config.version + (buildNumber > 0 ? `+${buildNumber}` : '') } ]) ) diff --git a/example/public/index.html b/example/public/index.html index 9003f941d8..b647d9718b 100644 --- a/example/public/index.html +++ b/example/public/index.html @@ -35,7 +35,7 @@ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ --> - Ketcher v2.0.0-RC+@@version + Ketcher @@version