Skip to content

Commit

Permalink
fixed x-docs issue with o-grid
Browse files Browse the repository at this point in the history
  • Loading branch information
ludrob committed Oct 18, 2018
1 parent 7679b5c commit cf76b42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/x-docs/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ module.exports = {
resolve: 'gatsby-source-filesystem',
options: {
name: 'docs',
path: '../../docs'
path: '../../docs',
ignore: ['**/bower_components']
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'components',
path: '../../components'
path: '../../components',
ignore: ['**/bower_components']
},
},
{
Expand Down
3 changes: 3 additions & 0 deletions tools/x-docs/src/lib/create-npm-package-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ module.exports = async (actions, graphql) => {
// Package manifest slug will be /package so remove it
const pagePath = path.dirname(node.fields.slug);

if (!node.name) {
throw new Error('invalidPackage:'+JSON.stringify(node));
}
actions.createPage({
component: path.resolve('src/templates/npm-package.jsx'),
// Remove the file name from the slug
Expand Down

0 comments on commit cf76b42

Please sign in to comment.