diff --git a/packages/views/package.json b/packages/views/package.json index 0c196c808..76a7a971e 100644 --- a/packages/views/package.json +++ b/packages/views/package.json @@ -38,7 +38,6 @@ "module": "dist/druxt-views.esm.js", "files": [ "dist", - "nuxt", "templates" ], "dependencies": { diff --git a/packages/views/src/index.js b/packages/views/src/index.js index 5e6cebb3a..71e2300b3 100644 --- a/packages/views/src/index.js +++ b/packages/views/src/index.js @@ -1,4 +1,5 @@ -import { DruxtViewsNuxtModule } from './nuxtModule' +import { DruxtViewsNuxtModule } from './nuxt' +DruxtViewsNuxtModule.meta = require('../package.json') /** * The Nuxt.js module function. @@ -8,7 +9,7 @@ import { DruxtViewsNuxtModule } from './nuxtModule' * @type {Function} * @exports default * @name DruxtViewsNuxtModule - * @see {@link ./module|DruxtViewsNuxtModule} + * @see {@link ./nuxt|DruxtViewsNuxtModule} */ export default DruxtViewsNuxtModule diff --git a/packages/views/src/nuxtModule.js b/packages/views/src/nuxt/index.js similarity index 94% rename from packages/views/src/nuxtModule.js rename to packages/views/src/nuxt/index.js index ddde1e745..abe5ea078 100644 --- a/packages/views/src/nuxtModule.js +++ b/packages/views/src/nuxt/index.js @@ -1,5 +1,5 @@ import { join, resolve } from 'path' -import DruxtViewsStorybook from './nuxtStorybook' +import DruxtViewsStorybook from './storybook' /** * The Nuxt.js module function. @@ -65,6 +65,4 @@ const DruxtViewsNuxtModule = function (moduleOptions = {}) { }) } -DruxtViewsNuxtModule.meta = require('../package.json') - export { DruxtViewsNuxtModule } diff --git a/packages/views/src/nuxtStorybook.js b/packages/views/src/nuxt/storybook.js similarity index 100% rename from packages/views/src/nuxtStorybook.js rename to packages/views/src/nuxt/storybook.js diff --git a/packages/views/test/nuxtModule.test.js b/packages/views/test/nuxt/index.test.js similarity index 83% rename from packages/views/test/nuxtModule.test.js rename to packages/views/test/nuxt/index.test.js index cb72eb551..1b0eab539 100644 --- a/packages/views/test/nuxtModule.test.js +++ b/packages/views/test/nuxt/index.test.js @@ -1,6 +1,6 @@ -import { DruxtViewsNuxtModule } from '../src/nuxtModule' +import { DruxtViewsNuxtModule } from '../../src/nuxt' -jest.mock('../src/nuxtStorybook') +jest.mock('../../src/nuxt/storybook') const mock = { addModule: jest.fn(), diff --git a/packages/views/test/nuxtStorybook.test.js b/packages/views/test/nuxt/storybook.test.js similarity index 83% rename from packages/views/test/nuxtStorybook.test.js rename to packages/views/test/nuxt/storybook.test.js index 7e602e250..f91de32f3 100644 --- a/packages/views/test/nuxtStorybook.test.js +++ b/packages/views/test/nuxt/storybook.test.js @@ -1,4 +1,4 @@ -import DruxtEntityStorybook from '../src/nuxtStorybook' +import DruxtEntityStorybook from '../../src/nuxt/storybook' jest.mock('axios')