diff --git a/example/index.jsx b/example/index.jsx index 7df1e58c5..8ec081700 100644 --- a/example/index.jsx +++ b/example/index.jsx @@ -5,7 +5,7 @@ const refParser = require('json-schema-ref-parser'); const oas = require('../packages/api-explorer-ui/__tests__/fixtures/petstore/oas'); const createDocs = require('../packages/api-explorer-ui/lib/create-docs'); -const ApiExplorer = require('../packages/api-explorer-ui'); +const ApiExplorer = require('../packages/api-explorer-ui/src/index.jsx'); (async function main() { const docs = createDocs(oas, 'api-setting'); diff --git a/package.json b/package.json index a12798b93..53c80a5c2 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "pretest": "npm run lint && npm run inspect", "test": "nyc mocha", "posttest": "nyc check-coverage --statements 90 --branches 70 --functions 90 --lines 90", - "example": "watchify packages/api-explorer-ui/src/index.jsx -t [ babelify ] -o 'derequire > packages/api-explorer-ui/dist/index.js' --extension jsx --standalone ApiExplorer & budo example/index.jsx --dir example -- -t babelify -p livereactload --extension .jsx" + "example": "budo example/index.jsx --dir example -- -t babelify -p livereactload --extension .jsx", + "build": "watchify packages/api-explorer-ui/src/index.jsx -t [ babelify ] -o 'derequire > packages/api-explorer-ui/dist/index.js' --extension jsx --standalone ApiExplorer" }, "publishConfig": { "registry": "http://registry.npmjs.org" diff --git a/packages/api-explorer-ui/__tests__/CodeSample.test.jsx b/packages/api-explorer-ui/__tests__/CodeSample.test.jsx index 2e46a0392..c7117ca20 100644 --- a/packages/api-explorer-ui/__tests__/CodeSample.test.jsx +++ b/packages/api-explorer-ui/__tests__/CodeSample.test.jsx @@ -1,6 +1,6 @@ const React = require('react'); const { shallow } = require('enzyme'); -const extensions = require('readme-oas-extensions'); +const extensions = require('../../readme-oas-extensions'); const CodeSample = require('../src/CodeSample'); diff --git a/packages/api-explorer-ui/__tests__/index.test.jsx b/packages/api-explorer-ui/__tests__/index.test.jsx index e75c95184..81d5d8edd 100644 --- a/packages/api-explorer-ui/__tests__/index.test.jsx +++ b/packages/api-explorer-ui/__tests__/index.test.jsx @@ -1,6 +1,6 @@ const React = require('react'); const { shallow } = require('enzyme'); -const extensions = require('readme-oas-extensions'); +const extensions = require('../../readme-oas-extensions'); const ApiExplorer = require('../src'); const oas = require('./fixtures/petstore/swagger'); diff --git a/packages/api-explorer-ui/__tests__/lib/show-code.test.js b/packages/api-explorer-ui/__tests__/lib/show-code.test.js index ce3a03831..eee11369f 100644 --- a/packages/api-explorer-ui/__tests__/lib/show-code.test.js +++ b/packages/api-explorer-ui/__tests__/lib/show-code.test.js @@ -1,4 +1,4 @@ -const extensions = require('readme-oas-extensions'); +const extensions = require('../../../readme-oas-extensions'); const showCode = require('../../src/lib/show-code');