nuxt-typed-vuex
Advanced tools
Comparing version
@@ -1,7 +0,6 @@ | ||
import { Configuration } from '@nuxt/types'; | ||
export default function nuxtTypedVuex(this: { | ||
options: Configuration; | ||
addPlugin: (options: any) => void; | ||
}): Promise<void>; | ||
export declare const meta: any; | ||
import { Module } from '@nuxt/types'; | ||
export * from 'typed-vuex'; | ||
declare const nuxtTypedVuex: Module; | ||
export default nuxtTypedVuex; |
@@ -1,19 +0,39 @@ | ||
import path from 'path'; | ||
import normalize from 'normalize-path'; | ||
export default async function nuxtTypedVuex() { | ||
if (!this.options.store) { | ||
console.warn('You do not have a Nuxt store defined.'); | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
const path2 = require('path'); | ||
const normalize = require('normalize-path'); | ||
const typedVuex = require('typed-vuex'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
const path2__default = /*#__PURE__*/_interopDefaultLegacy(path2); | ||
const normalize__default = /*#__PURE__*/_interopDefaultLegacy(normalize); | ||
const nuxtTypedVuex = async function() { | ||
if (!this.options.store) { | ||
console.warn("You do not have a Nuxt store defined."); | ||
} | ||
const buildDir = this.options.buildDir || ""; | ||
this.addPlugin({ | ||
src: path2__default['default'].resolve(__dirname, "../template/plugin.js"), | ||
fileName: "nuxt-typed-vuex.js", | ||
options: { | ||
store: normalize__default['default'](path2__default['default'].join(buildDir, "store")) | ||
} | ||
const buildDir = this.options.buildDir || ''; | ||
this.addPlugin({ | ||
src: path.resolve(__dirname, './plugin.js'), | ||
fileName: 'nuxt-typed-vuex.js', | ||
options: { | ||
store: normalize(path.join(buildDir, 'store')), | ||
}, | ||
}); | ||
} | ||
// eslint-disable-next-line | ||
export const meta = require('../package.json'); | ||
export * from 'typed-vuex'; | ||
//# sourceMappingURL=index.js.map | ||
}); | ||
this.options.build.transpile = this.options.build.transpile || []; | ||
this.options.build.transpile.push(/typed-vuex/); | ||
}; | ||
nuxtTypedVuex.meta = {name: "nuxt-typed-vuex"}; | ||
Object.keys(typedVuex).forEach(function (k) { | ||
if (k !== 'default') Object.defineProperty(exports, k, { | ||
enumerable: true, | ||
get: function () { | ||
return typedVuex[k]; | ||
} | ||
}); | ||
}); | ||
exports.default = nuxtTypedVuex; |
{ | ||
"name": "nuxt-typed-vuex", | ||
"version": "0.1.20", | ||
"version": "0.1.21", | ||
"description": "A typed store accessor for Nuxt.", | ||
"repository": "danielroe/nuxt-typed-vuex", | ||
"license": "MIT", | ||
"author": { | ||
"name": "Daniel Roe", | ||
"email": "daniel@roe.dev", | ||
"url": "https://github.com/danielroe" | ||
}, | ||
"keywords": [ | ||
@@ -21,34 +14,43 @@ "vuex", | ||
], | ||
"repository": "danielroe/nuxt-typed-vuex", | ||
"license": "MIT", | ||
"author": { | ||
"name": "Daniel Roe", | ||
"email": "daniel@roe.dev", | ||
"url": "https://github.com/danielroe" | ||
}, | ||
"main": "lib/index.js", | ||
"module": "lib/index.es.js", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
"lib/**/*", | ||
"template/*", | ||
"!**/*.map" | ||
], | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"scripts": { | ||
"build": "yarn clean && yarn compile", | ||
"compile": "tsc", | ||
"clean": "rm -rf lib test/fixture/.nuxt test/fixture/dist" | ||
"clean": "rm -rf lib test/fixture/.nuxt test/fixture/dist", | ||
"compile": "siroc build" | ||
}, | ||
"tsd": { | ||
"directory": "test/tsd", | ||
"compilerOptions": { | ||
"rootDir": "." | ||
} | ||
"dependencies": { | ||
"normalize-path": "^3.0.0", | ||
"typed-vuex": "0.1.21" | ||
}, | ||
"devDependencies": { | ||
"@nuxt/types": "^2.14.0", | ||
"@nuxt/types": "^2.14.3", | ||
"@nuxt/typescript-build": "^2.0.2", | ||
"@types/normalize-path": "^3.0.0", | ||
"nuxt": "2.14.0", | ||
"nuxt": "2.14.3", | ||
"ts-loader": "^8.0.2", | ||
"tsd": "^0.13.1" | ||
}, | ||
"dependencies": { | ||
"normalize-path": "^3.0.0", | ||
"typed-vuex": "0.1.20" | ||
"peerDependencies": { | ||
"@nuxt/types": "^2.14.3" | ||
}, | ||
"peerDependencies": { | ||
"@nuxt/types": "^2.0.0" | ||
"tsd": { | ||
"directory": "test/tsd", | ||
"compilerOptions": { | ||
"rootDir": "." | ||
} | ||
} | ||
} |
63
65.79%3517
-55.53%5
-16.67%+ Added
- Removed
Updated