Skip to content

Commit ecf92d9

Browse files
committed
fix(types): update type exports
1 parent b9dcbe9 commit ecf92d9

File tree

8 files changed

+143
-62
lines changed

8 files changed

+143
-62
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
| Statements | Branches | Functions | Lines |
99
| --------------------------- | ----------------------- | ------------------------- | ----------------- |
10-
| ![Statements](https://img.shields.io/badge/Coverage-90.63%25-brightgreen.svg) | ![Branches](https://img.shields.io/badge/Coverage-79.84%25-red.svg) | ![Functions](https://img.shields.io/badge/Coverage-92.86%25-brightgreen.svg) | ![Lines](https://img.shields.io/badge/Coverage-90.63%25-brightgreen.svg) |
10+
| ![Statements](https://img.shields.io/badge/Coverage-90.85%25-brightgreen.svg) | ![Branches](https://img.shields.io/badge/Coverage-79.84%25-red.svg) | ![Functions](https://img.shields.io/badge/Coverage-92.86%25-brightgreen.svg) | ![Lines](https://img.shields.io/badge/Coverage-90.68%25-brightgreen.svg) |
1111

1212
Looking for the old CLI extension? [nuxt-laravel](https://github.com/m2sd/nuxt-laravel/tree/legacy).
1313

lib/module.js

+4
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,8 @@ const laravelModule = function (overwrites) {
227227
utils_1.logger.info('Generation configured for Laravel SPA.');
228228
};
229229
exports.default = laravelModule;
230+
var constants_2 = require("./constants");
231+
exports.moduleKey = constants_2.moduleKey;
232+
exports.laravelAppEnv = constants_2.laravelAppEnv;
233+
exports.nuxtOutputEnv = constants_2.nuxtOutputEnv;
230234
exports.meta = require('../package.json');

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"files": [
88
"bin",
99
"lib",
10-
"types",
11-
"*-shim.d.ts"
10+
"types"
1211
],
1312
"engines": {
1413
"node": ">=8.10.0"
@@ -45,7 +44,6 @@
4544
"devDependencies": {
4645
"@commitlint/cli": "^8.3.5",
4746
"@commitlint/config-conventional": "^8.3.4",
48-
"@nuxt/types": "^0.3.4",
4947
"@nuxtjs/axios": "^5.9.5",
5048
"@nuxtjs/module-test-utils": "^1.5.0",
5149
"@nuxtjs/proxy": "^1.3.3",
@@ -79,6 +77,7 @@
7977
"typescript": "^3.8.2"
8078
},
8179
"dependencies": {
80+
"@nuxt/types": "^0.7.4",
8281
"dotenv": "^8.2.0",
8382
"execa": "^2.1.0",
8483
"fs-extra": "^8.1.0",

src/module.ts

+9
Original file line numberDiff line numberDiff line change
@@ -349,4 +349,13 @@ const laravelModule: Module<Options> = function(overwrites) {
349349
}
350350

351351
export default laravelModule
352+
export { Options } from './options'
353+
export { moduleKey, laravelAppEnv, nuxtOutputEnv } from './constants'
354+
355+
declare module '@nuxt/types' {
356+
interface Configuration {
357+
laravel?: Options
358+
}
359+
}
360+
352361
export const meta = require('../package.json')

src/options.ts

-6
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,3 @@ export const getConfiguration = (
126126
routerBase
127127
}
128128
}
129-
130-
declare module '@nuxt/types' {
131-
export interface Configuration {
132-
laravel?: Options
133-
}
134-
}

types/module.d.ts

+7
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@ import { Module } from '@nuxt/types';
22
import { Options } from './options';
33
declare const laravelModule: Module<Options>;
44
export default laravelModule;
5+
export { Options } from './options';
6+
export { moduleKey, laravelAppEnv, nuxtOutputEnv } from './constants';
7+
declare module '@nuxt/types' {
8+
interface Configuration {
9+
laravel?: Options;
10+
}
11+
}
512
export declare const meta: any;

types/options.d.ts

-5
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,3 @@ export declare const getConfiguration: (nuxtOptions: Configuration, overwrites?:
4242
};
4343
routerBase: string;
4444
};
45-
declare module '@nuxt/types' {
46-
interface Configuration {
47-
laravel?: Options;
48-
}
49-
}

0 commit comments

Comments
 (0)