From 1a6179e9319568b6777c6a1c676781bec6ae1d54 Mon Sep 17 00:00:00 2001 From: James Gareth Smith Date: Mon, 9 Jul 2018 09:42:19 +0200 Subject: [PATCH 1/4] set asset prefix --- next.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/next.config.js b/next.config.js index e313a14..ef52ee3 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,7 @@ const withSass = require('@zeit/next-sass') module.exports = withSass({ + assetPrefix: isProduction ? '/ETHPrize' : '', exportPathMap: function(defaultPathMap) { return { '/': { page: '/' } From ebad4362123ca1d5e66111c499b19e4b332dcfbf Mon Sep 17 00:00:00 2001 From: James Gareth Smith Date: Mon, 9 Jul 2018 09:59:57 +0200 Subject: [PATCH 2/4] setting env with NODE_ENV --- .gitignore | 3 ++- README.md | 2 +- next.config.js | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 51bf003..e7fb1a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /out .next node_modules -.DS_Store \ No newline at end of file +.DS_Store +yarn.lock \ No newline at end of file diff --git a/README.md b/README.md index 07f29f4..bc969b6 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,4 @@ ETHPrize single page React website `npm run deploy` to deploy to `https://nona-creative.github.io/ETHPrize` -`yarn lint` runs the eslinter +`npm lint` runs the eslinter diff --git a/next.config.js b/next.config.js index ef52ee3..dd0dd53 100644 --- a/next.config.js +++ b/next.config.js @@ -1,7 +1,10 @@ -const withSass = require('@zeit/next-sass') +const withSass = require('@zeit/next-sass'); + +const dev = process && process.env && process.env.NODE_ENV === 'development'; + module.exports = withSass({ - assetPrefix: isProduction ? '/ETHPrize' : '', + assetPrefix: dev ? '' : '/ETHPrize', exportPathMap: function(defaultPathMap) { return { '/': { page: '/' } From 4e1e7cf90a56a5741c75ab90477f2d0529320aaa Mon Sep 17 00:00:00 2001 From: James Gareth Smith Date: Mon, 9 Jul 2018 13:18:51 +0200 Subject: [PATCH 3/4] test fix for fonts --- assets/styles/base/fonts.scss | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/styles/base/fonts.scss b/assets/styles/base/fonts.scss index ab7ea55..16cb9e5 100644 --- a/assets/styles/base/fonts.scss +++ b/assets/styles/base/fonts.scss @@ -1,11 +1,11 @@ @font-face { font-family: 'bebas_neuebold'; - src: url('/static/fonts/bebasneue_bold-webfont.eot'); - src: url('/static/fonts/bebasneue_bold-webfont.eot?#iefix') format('embedded-opentype'), - url('/static/fonts/bebasneue_bold-webfont.woff2') format('woff2'), - url('/static/fonts/bebasneue_bold-webfont.woff') format('woff'), - url('/static/fonts/bebasneue_bold-webfont.ttf') format('truetype'), - url('/static/fonts/bebasneue_bold-webfont.svg#bebas_neuebold') format('svg'); + src: url('static/fonts/bebasneue_bold-webfont.eot'); + src: url('static/fonts/bebasneue_bold-webfont.eot?#iefix') format('embedded-opentype'), + url('static/fonts/bebasneue_bold-webfont.woff2') format('woff2'), + url('static/fonts/bebasneue_bold-webfont.woff') format('woff'), + url('static/fonts/bebasneue_bold-webfont.ttf') format('truetype'), + url('static/fonts/bebasneue_bold-webfont.svg#bebas_neuebold') format('svg'); font-weight: normal; font-style: normal; } From f8bedec3ea77476fdfd9adfba5f7eb7ab2dbb0bd Mon Sep 17 00:00:00 2001 From: James Gareth Smith Date: Mon, 9 Jul 2018 13:40:21 +0200 Subject: [PATCH 4/4] hardcoded repo to get staging working for client review --- assets/styles/base/fonts.scss | 12 ++++++------ pages/_document.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/assets/styles/base/fonts.scss b/assets/styles/base/fonts.scss index 16cb9e5..d62f8d6 100644 --- a/assets/styles/base/fonts.scss +++ b/assets/styles/base/fonts.scss @@ -1,11 +1,11 @@ @font-face { font-family: 'bebas_neuebold'; - src: url('static/fonts/bebasneue_bold-webfont.eot'); - src: url('static/fonts/bebasneue_bold-webfont.eot?#iefix') format('embedded-opentype'), - url('static/fonts/bebasneue_bold-webfont.woff2') format('woff2'), - url('static/fonts/bebasneue_bold-webfont.woff') format('woff'), - url('static/fonts/bebasneue_bold-webfont.ttf') format('truetype'), - url('static/fonts/bebasneue_bold-webfont.svg#bebas_neuebold') format('svg'); + src: url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.eot'); + src: url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.eot?#iefix') format('embedded-opentype'), + url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.woff2') format('woff2'), + url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.woff') format('woff'), + url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.ttf') format('truetype'), + url('/nona-creative.github.io-ETHprize/static/fonts/bebasneue_bold-webfont.svg#bebas_neuebold') format('svg'); font-weight: normal; font-style: normal; } diff --git a/pages/_document.js b/pages/_document.js index 50993e4..684849d 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -8,7 +8,7 @@ export default class MyDocument extends Document { - +