Skip to content

Commit

Permalink
fix(@patternfly/react-docs): fixes the path to the font files (patter…
Browse files Browse the repository at this point in the history
…nfly#649)

affects: @patternfly/react-docs
  • Loading branch information
jschuler authored and tlabaj committed Sep 25, 2018
1 parent 4fb0b0b commit 9a26933
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/patternfly-4/react-docs/build/copyDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function copyStyles() {

function copyAssets() {
const from = path.resolve(__dirname, '../dist/styles/react-core/assets');
const to = path.resolve(__dirname, '../public/assets');
const to = path.resolve(__dirname, '../static/assets');
fs.copySync(from, to);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/patternfly-4/react-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"gatsby"
],
"scripts": {
"docbuild": "gatsby build && node build/copyDocs.js",
"docbuild": "node build/copyDocs.js && gatsby build",
"develop": "gatsby develop"
},
"browserslist": [
Expand All @@ -44,4 +44,4 @@
"fs-extra": "^7.0.0",
"glob": "^7.1.2"
}
}
}
4 changes: 3 additions & 1 deletion packages/patternfly-4/react-docs/src/layouts/example.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import PropTypes from 'prop-types';
import { withPrefix } from 'gatsby-link';

// This is a gatsby limitation will be fixed in newer version
const globalStyles = require(`!raw-loader!@patternfly/react-core/../dist/styles/base.css`);
let globalStyles = require(`!raw-loader!@patternfly/react-core/../dist/styles/base.css`);
globalStyles = globalStyles.replace(/\.\/assets\//g, withPrefix('/assets/'));
const localStyles = require(`!raw-loader!./index.css`);
import { injectGlobal } from 'emotion';

Expand Down
4 changes: 3 additions & 1 deletion packages/patternfly-4/react-docs/src/layouts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import Helmet from 'react-helmet';
import Page from '../components/page';
import Navigation from '../components/navigation';
import PropTypes from 'prop-types';
import { withPrefix } from 'gatsby-link';

// This is a gatsby limitation will be fixed in newer version
const globalStyles = require(`!raw-loader!@patternfly/react-core/../dist/styles/base.css`);
let globalStyles = require(`!raw-loader!@patternfly/react-core/../dist/styles/base.css`);
globalStyles = globalStyles.replace(/\.\/assets\//g, withPrefix('/assets/'));
const localStyles = require(`!raw-loader!./index.css`);
import { injectGlobal } from 'emotion';

Expand Down

0 comments on commit 9a26933

Please sign in to comment.