Skip to content

Commit d6a8f55

Browse files
jamiebuildsjuanpicado
authored andcommitted
feat: accept primary color to be configured (conventional-changelog#36)
1 parent eda98b8 commit d6a8f55

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/webui/template/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
window.VERDACCIO_API_URL = '<%= htmlWebpackPlugin.options.verdaccioURL %>/-/verdaccio/';
1313
window.VERDACCIO_SCOPE = '<%= htmlWebpackPlugin.options.scope %>';
1414
window.VERDACCIO_LOGO = '<%= htmlWebpackPlugin.options.logo %>';
15+
window.VERDACCIO_PRIMARY_COLOR = '<%= htmlWebpackPlugin.options.primary_color %>';
1516
window.VERDACCIO_VERSION = '<%= htmlWebpackPlugin.options.version_app %>';
1617
</script>
1718
</head>

src/webui/utils/styles/colors.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const colors = {
3030
// Main colors
3131
// -------------------------
3232

33-
primary: '#4b5e40',
33+
primary: window.VERDACCIO_PRIMARY_COLOR || '#4b5e40',
3434
secondary: '#20232a',
3535

3636
};

tools/webpack.prod.config.babel.js

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const prodConf = {
4747
title: 'ToReplaceByTitle',
4848
scope: 'ToReplaceByScope',
4949
logo: 'ToReplaceByLogo',
50+
primary_color: 'ToReplaceByPrimaryColor',
5051
filename: 'index.html',
5152
favicon: `${env.SRC_ROOT}/webui/template/favicon.ico`,
5253
verdaccioURL: 'ToReplaceByVerdaccio',

0 commit comments

Comments
 (0)