Skip to content

Commit

Permalink
set the html title and description from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
FredericHeem committed Mar 15, 2017
1 parent edcab3b commit 20bfe8e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
3 changes: 2 additions & 1 deletion client/package.json
@@ -1,7 +1,8 @@
{
"name": "starhackit-ui",
"title": "StartHack.It",
"version": "2.5.0",
"description": "React/Redux starter kit",
"description": "React + node starter kit. A fullstack boilerplate written in ES6/7 with authentication and authorisation",
"homepage": "https://github.com/FredericHeem/starhackit",
"license": "NLPL",
"scripts": {
Expand Down
13 changes: 3 additions & 10 deletions client/src/index.ejs
Expand Up @@ -2,14 +2,11 @@
<html class="no-js">
<head>
<meta charset="utf-8">
<title>StarHackIt</title>
<meta name="description" content="react + node starter kit. A fullstack boilerplate written in ES6 and ES7 with authentication and authorization">
<title><%= htmlWebpackPlugin.options.title %></title>
<meta name="description" content="<%= htmlWebpackPlugin.options.description %>">
<meta name="viewport" content="width=device-width">
<link rel='shortcut icon' type='image/png' href='/favicon.ico' />

<% for (var css in htmlWebpackPlugin.files.css) { %>
<link href="/<%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
<% } %>
</head>

<body>
Expand Down Expand Up @@ -39,7 +36,7 @@
}
</style>
<div id="initializing">
<h1>Starhack.it</h1>
<h1><%= htmlWebpackPlugin.options.title %></h1>
<i class="icon-spin1 animate-spin"></i>
</div>
</div>
Expand All @@ -48,10 +45,6 @@
<script src="https://cdn.polyfill.io/v2/polyfill.js?features=Promise"></script>
<![endif]-->

<!--The application-->
<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
<script src="/<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script>
<% } %>

</body>
</html>
3 changes: 2 additions & 1 deletion client/webpack.config.js
Expand Up @@ -54,7 +54,8 @@ module.exports = function ( options ) {
//new ExtractTextPlugin('[name].[chunkhash].css'),
new HtmlWebpackPlugin({
template: 'src/index.ejs',
inject: false
title: pkg.title,
description: pkg.description
}),
new webpack.DefinePlugin( {
__VERSION__: JSON.stringify(pkg.version)
Expand Down

0 comments on commit 20bfe8e

Please sign in to comment.