Skip to content

Commit

Permalink
#97 publish Ketcher to NPM (#115)
Browse files Browse the repository at this point in the history
- update webpack.config.js
- update index.html
  • Loading branch information
AndreiMazol committed Nov 26, 2020
1 parent eb46999 commit ef0b09b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions example/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -24,7 +24,8 @@ module.exports = override(
new HtmlReplaceWebpackPlugin([
{
pattern: '@@version',
replacement: gitRevisionPlugin.commithash()
replacement:
'v' + config.version + (buildNumber > 0 ? `+${buildNumber}` : '')
}
])
)
Expand Down
2 changes: 1 addition & 1 deletion example/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>Ketcher v2.0.0-RC+@@version</title>
<title>Ketcher @@version</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down

0 comments on commit ef0b09b

Please sign in to comment.