Moved manifest.json up one layer

This commit is contained in:
squidfunk 2019-12-10 16:03:11 +01:00
parent 182ded9e7c
commit 633bcace14
3 changed files with 4 additions and 3 deletions

2
.gitignore vendored
View File

@ -31,8 +31,8 @@ venv
# Files generated by build # Files generated by build
/build /build
/material/manifest.json
/MANIFEST /MANIFEST
/manifest.json
/site /site
# Distribution files # Distribution files

View File

@ -75,7 +75,7 @@
{% if font != false %} {% if font != false %}
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin> <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{
font.text | replace(' ', '+') + ':300,400,400i,700|' + font.text | replace(' ', '+') + ':300,400,400i,700%7C' +
font.code | replace(' ', '+') font.code | replace(' ', '+')
}}&display=fallback"> }}&display=fallback">
<style>body,input{font-family:"{{ font.text }}","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"{{ font.code }}","Courier New",Courier,monospace}</style> <style>body,input{font-family:"{{ font.text }}","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"{{ font.code }}","Courier New",Courier,monospace}</style>

View File

@ -306,6 +306,7 @@ module.exports = (_env, args) => { // eslint-disable-line complexity
/* Write manifest */ /* Write manifest */
new ManifestPlugin({ new ManifestPlugin({
fileName: "../manifest.json",
/* This is an ugly workaround for the fact that the manifest plugin /* This is an ugly workaround for the fact that the manifest plugin
doesn't handle multiple chunks. See http://bit.ly/2BbfER9 */ doesn't handle multiple chunks. See http://bit.ly/2BbfER9 */
@ -318,7 +319,7 @@ module.exports = (_env, args) => { // eslint-disable-line complexity
/* Apply manifest */ /* Apply manifest */
new EventHooksPlugin({ new EventHooksPlugin({
afterEmit: new CallbackTask((compilation, cb) => { afterEmit: new CallbackTask((compilation, cb) => {
const manifest = require(path.resolve("material/manifest.json")) const manifest = require(path.resolve("manifest.json"))
Object.keys(compilation.assets).forEach(name => { Object.keys(compilation.assets).forEach(name => {
if (name.match(/\.html/)) { if (name.match(/\.html/)) {
const asset = compilation.assets[name] const asset = compilation.assets[name]