Skip to content

Commit

Permalink
fix(utils): move exampleContent
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Fedyashov committed Sep 26, 2017
1 parent 37f622f commit ff81326
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 6 additions & 0 deletions docs/app/utils/exampleContext.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Get the Webpack Context for all doc site examples.
*/
export const exampleContext = require.context('docs/app/Examples/', true, /(\w+Example\w*|index)\.js$/)

export default exampleContext
6 changes: 1 addition & 5 deletions docs/app/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ import { META } from 'src/lib'

export * from './constants'
export * from './docs'
export exampleContext from './exampleContext'
export scrollToAnchor from './scrollToAnchor'

/**
* Get the Webpack Context for all doc site examples.
*/
export const exampleContext = require.context('docs/app/Examples/', true, /(\w+Example\w*|index)\.js$/)

export const parentComponents = _.flow(
_.filter(META.isParent),
_.sortBy('_meta.name'),
Expand Down
4 changes: 2 additions & 2 deletions test/specs/docs/examples-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createElement } from 'react'

import { sandbox, consoleUtil } from '../../utils'
import { exampleContext } from '../../../docs/app/utils'
import { exampleContext } from 'docs/app/utils/exampleContext'
import { sandbox, consoleUtil } from 'test/utils'

describe('examples', () => {
/* eslint-disable no-console */
Expand Down

0 comments on commit ff81326

Please sign in to comment.