拿掉 build files

This commit is contained in:
2022-07-18 16:33:23 +08:00
parent 41e2287bcb
commit 3707f158a3
31953 changed files with 0 additions and 4411796 deletions
-114
View File
@@ -1,114 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [2.7.2](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.7.1...v2.7.2) (2020-04-21)
### [2.7.1](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.7.0...v2.7.1) (2020-04-21)
## [2.7.0](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.5.1...v2.7.0) (2020-04-21)
### Features
* add other formats to package.json ([dbdc488](https://github.com/nuxt-community/nuxt-property-decorator/commit/dbdc4888fd1780f632f58913cb9fc6a962fa40a3))
### [2.5.1](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.5.0...v2.5.1) (2020-02-17)
### Bug Fixes
* missing methods ([187ab3c](https://github.com/nuxt-community/nuxt-property-decorator/commit/187ab3cd0de8ea9fe579721bf6dff9b719ef3247))
## [2.5.0](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.4.1...v2.5.0) (2019-10-18)
### Features
* add meta hook and update documentation ([6562108](https://github.com/nuxt-community/nuxt-property-decorator/commit/6562108))
### [2.4.1](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.4.0...v2.4.1) (2019-10-17)
## [2.4.0](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.3.0...v2.4.0) (2019-09-02)
### Features
* **deps:** updates vue-property-decorator ([e9ee54e](https://github.com/nuxt-community/nuxt-property-decorator/commit/e9ee54e))
* Added @PropSync decorator
* Added @ProvideReactive and @InjectReactive decorator
* Added @Ref decorator
## [2.3.0](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.1.3...v2.3.0) (2019-06-02)
### Features
* **deps:** updates vue-property-decorator ([6fd8195](https://github.com/nuxt-community/nuxt-property-decorator/commit/6fd8195))
## [2.1.3](https://github.com/nuxt-community/nuxt-property-decorator/compare/v2.1.2...v2.1.3) (2019-02-26)
<a name="2.0.1"></a>
## [2.0.1](https://github.com/nuxt-community/nuxt-property-decorator/compare/v1.3.1...v2.0.1) (2019-02-08)
Library is fully inline with [Vue-class-component](https://github.com/vuejs/vue-class-component)
### Breaking changes
There is only one breaking change and that is renaming `mixins` to `Mixins ` to keep inline with vue-property-decorator
<a name="1.2.0"></a>
## [1.2.0](https://github.com/nuxt-community/nuxt-property-decorator/compare/v1.1.8...v1.2.0) (2018-04-12)
### Features
* add build directly into the versionning ([d235bec](https://github.com/nuxt-community/nuxt-property-decorator/commit/d235bec))
<a name="1.1.8"></a>
## [1.1.8](https://github.com/nuxt-community/nuxt-property-decorator/compare/v1.1.7...v1.1.8) (2018-04-12)
### Bug Fixes
* **postinstall:** build after postinstall ([46f8990](https://github.com/nuxt-community/nuxt-property-decorator/commit/46f8990))
<a name="1.1.7"></a>
## [1.1.7](https://github.com/nuxt-community/nuxt-property-decorator/compare/v1.1.6...v1.1.7) (2018-04-12)
### Bug Fixes
* **build:** npm prehook ([33bb5f0](https://github.com/nuxt-community/nuxt-property-decorator/commit/33bb5f0))
<a name="1.1.6"></a>
## [1.1.6](https://github.com/nuxt-community/nuxt-property-decorator/compare/v1.1.5...v1.1.6) (2018-04-12)
### Bug Fixes
* **build:** automatically build umd ([b7df4c4](https://github.com/nuxt-community/nuxt-property-decorator/commit/b7df4c4))
<a name="1.1.5"></a>
## 1.1.5 (2018-04-12)
### Bug Fixes
* **build:** build typescript as js module ([a45ab44](https://github.com/nuxt-community/nuxt-property-decorator/commit/a45ab44))
-21
View File
@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2016 kaorun343
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-256
View File
@@ -1,256 +0,0 @@
# Nuxt Property Decorator
<p align="center">
<a href="https://david-dm.org/nuxt-community/nuxt-property-decorator">
<img alt="" src="https://david-dm.org/nuxt-community/nuxt-property-decorator/status.svg?style=flat-square">
</a>
<br>
<a href="https://npmjs.com/package/nuxt-property-decorator">
<img alt="" src="https://img.shields.io/npm/v/nuxt-property-decorator/latest.svg?style=flat-square">
</a>
<a href="https://npmjs.com/package/nuxt-property-decorator">
<img alt="" src="https://img.shields.io/npm/dt/nuxt-property-decorator.svg?style=flat-square">
</a>
</p>
Handy ES / TypeScript decorators for class-style Vue components in Nuxt (based on [Vue class component](https://github.com/vuejs/vue-class-component)) and Property decorators for Vue (bases on [Vue Property Decorator](https://github.com/kaorun343/vue-property-decorator)) and Vuex (based on [Vuex Class](https://github.com/ktsn/vuex-class/))
This library fully depends on [vue-class-component](https://github.com/vuejs/vue-class-component).
## License
MIT License
## Install
Installation is very easy
```bash
npm i -S nuxt-property-decorator
```
or
```bash
yarn add nuxt-property-decorator
```
### Nuxt JS Instructions
Currently decorators need the following two Babel plugins to work `@babel/plugin-proposal-decorators`,`"@babel/plugin-proposal-class-properties`. Latest Nuxt already adds them for us, the only thing we need is to add `loose` parameter to `@nuxt/babel-preset-app`. Just add this to nuxt-config
```js
build: {
babel: {
presets({ isServer }) {
return [
[
"@nuxt/babel-preset-app", { loose: true }
]
]
}
}
}
```
### Nuxt TS Instructions
It works out of the box with Nuxt TS.
## Decorators and helpers
There are following decorators:
* **Nuxt specific decorators**
* `@Off` - decorator of $off
* `@On`- decorator of $on
* `@Once`- decorator of $once
* `@NextTick` -decorator of $nextTick
* **exported from** [`vue-class-component`](https://github.com/vuejs/vue-class-component)
* `@Component`
* **exported from** [`vue-property-decorator`](https://github.com/kaorun343/vue-property-decorator)
* [`@Emit`](https://github.com/kaorun343/vue-property-decorator/#Emit)
* [`@Inject`](https://github.com/kaorun343/vue-property-decorator/#Provide)
* [`@InjectReactive`](https://github.com/kaorun343/vue-property-decorator/#ProvideReactive)
* [`@Model`](https://github.com/kaorun343/vue-property-decorator/#Model)
* [`@Prop`](https://github.com/kaorun343/vue-property-decorator/#Prop)
* [`@PropSync`](https://github.com/kaorun343/vue-property-decorator/#PropSync)
* [`@Provide`](https://github.com/kaorun343/vue-property-decorator/#Provide)
* [`@ProvideReactive`](https://github.com/kaorun343/vue-property-decorator/#ProvideReactive)
* [`@Ref`](https://github.com/kaorun343/vue-property-decorator/#Ref)
* [`@Watch`](https://github.com/kaorun343/vue-property-decorator/#Watch)
* **exported from** [`vuex-class`](https://github.com/ktsn/vuex-class)
* `@State`
* `@Getter`
* `@Action`
* `@Mutation`
* **exported from** [`vuex-module-decorators`](https://github.com/championswimmer/vuex-module-decorators)
* Module,
* getModule,
* VuexModule,
* VuexMutation (`Mutation` from original renamed to avoid conflict with 'vuex-class' one),
* MutationAction,
* VuexAction (`Action` from original renamed to avoid conflict with 'vuex-class' one),
### Other exports
* `namespace `
* `mixins`
* `Vue`
## Hooks
### Vue Router hooks
* `beforeRouteEnter`
* `beforeRouteUpdate`
* `beforeRouteLeave`
### Nuxt hooks
* `asyncData`
* `fetch`
* `head`
* `key`
* `layout`
* `loading`
* `middleware`
* `scrollToTop`
* `transition`
* `validate`
* `watchQuery`
* `meta`
### Vue-class Hooks
* `data`
* `beforeCreate`
* `created`
* `beforeMount`
* `mounted`
* `beforeDestroy`
* `destroyed`
* `beforeUpdate`
* `updated`
* `activated`
* `deactivated`
* `render`
* `errorCaptured`
* `serverPrefetch`
## Usage
```typescript
import { Component, Inject, Model, Prop, Provide, Vue, Watch } from 'nuxt-property-decorator'
const s = Symbol('baz')
@Component({
components: { comp }
})
export class MyComponent extends Vue {
@Inject() foo!: string
@Inject('bar') bar!: string
@Inject(s) baz!: string
@Model('change') checked!: boolean
@Prop()
propA!: number
@Prop({ default: 'default value' })
propB!: string
@Prop([String, Boolean])
propC!: string | boolean
@Prop({ type: null })
propD!: any
@Provide() foo = 'foo'
@Provide('bar') baz = 'bar'
@Watch('child')
onChildChanged(val: string, oldVal: string) { }
@Watch('person', { immediate: true, deep: true })
onPersonChanged(val: Person, oldVal: Person) { }
beforeRouteLeave (to, from, next) {
// called when the route that renders this component is about to
// be navigated away from.
// has access to `this` component instance.
}
}
```
is equivalent to
```js
const s = Symbol('baz')
export const MyComponent = Vue.extend({
name: 'MyComponent',
components: { comp },
inject: {
foo: 'foo',
bar: 'bar',
[s]: s
},
model: {
prop: 'checked',
event: 'change'
},
props: {
   checked: Boolean,
   propA: Number,
propB: {
type: String,
default: 'default value'
},
propC: [String, Boolean],
propD: { type: null }
},
data () {
return {
foo: 'foo',
baz: 'bar'
}
},
provide () {
return {
foo: this.foo,
bar: this.baz
}
},
methods: {
onChildChanged(val, oldVal) { },
onPersonChanged(val, oldVal) { }
},
beforeRouteLeave (to, from, next) {
// called when the route that renders this component is about to
// be navigated away from.
// has access to `this` component instance.
},
watch: {
'child': {
handler: 'onChildChanged',
immediate: false,
deep: false
},
'person': {
handler: 'onPersonChanged',
immediate: true,
deep: true
}
}
})
```
As you can see at `propA` and `propB`, the type can be inferred automatically when it's a simple type. For more complex types like enums you do need to specify it specifically.
Also this library needs to have `emitDecoratorMetadata` set to `true` for this to work.
## Useful links
See also:
* [Vue Property Decorator](https://github.com/kaorun343/vue-property-decorator)
* [Vue class component](https://github.com/vuejs/vue-class-component)
* [Vuex Class](https://github.com/ktsn/vuex-class/)
* [Nuxt Class Component](https://github.com/nuxt-community/nuxt-class-component)
@@ -1,269 +0,0 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var vue = _interopDefault(require('vue'));
var vuePropertyDecorator = require('vue-property-decorator');
var Component = require('vue-class-component');
var Component__default = _interopDefault(Component);
var vuexModuleDecorators = require('vuex-module-decorators');
var vuexClass = require('vuex-class');
Component__default.registerHooks([
"beforeRouteEnter",
"beforeRouteUpdate",
"beforeRouteLeave",
"asyncData",
"fetch",
"head",
"key",
"layout",
"loading",
"middleware",
"scrollToTop",
"transition",
"validate",
"watchQuery",
"meta",
]);
// Code copied from Vue/src/shared/util.js
var hyphenateRE = /\B([A-Z])/g;
var hyphenate = function (str) { return str.replace(hyphenateRE, "-$1").toLowerCase(); };
/**
* decorator of $off
* @param event The name of the event
* @param method The name of the method
*/
function Off(event, method) {
return function (target, key, descriptor) {
key = hyphenate(key);
var original = descriptor.value;
descriptor.value = function offer() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (original.apply(this, args) !== false) {
if (method) {
if (typeof this[method] === "function") {
this.$off(event || key, this[method]);
}
else {
throw new TypeError("must be a method name");
}
}
else if (event) {
this.$off(event || key);
}
else {
this.$off();
}
}
};
};
}
/**
* decorator of $on
* @param event The name of the event
*/
function On(event) {
return Component.createDecorator(function (componentOptions, k) {
var key = hyphenate(k);
if (typeof componentOptions.created !== "function") {
componentOptions.created = function () { };
}
var original = componentOptions.created;
componentOptions.created = function () {
original();
if (typeof componentOptions.methods !== "undefined") {
this.$on(event || key, componentOptions.methods[k]);
}
};
});
}
/**
* decorator of $once
* @param event The name of the event
*/
function Once(event) {
return Component.createDecorator(function (componentOptions, k) {
var key = hyphenate(k);
if (typeof componentOptions.created !== "function") {
componentOptions.created = function () { };
}
var original = componentOptions.created;
componentOptions.created = function () {
original();
if (typeof componentOptions.methods !== "undefined") {
this.$once(event || key, componentOptions.methods[k]);
}
};
});
}
/**
* decorator of $nextTick
*
* @export
* @param {string} method
* @returns {MethodDecorator}
*/
function NextTick(method) {
return function (target, key, descriptor) {
var original = descriptor.value;
descriptor.value = function emitter() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (original.apply(this, args) !== false)
if (typeof this[method] === "function") {
this.$nextTick(this[method]);
}
else {
throw new TypeError("must be a method name");
}
};
};
}
exports.Vue = vue;
Object.defineProperty(exports, 'Emit', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Emit;
}
});
Object.defineProperty(exports, 'Inject', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Inject;
}
});
Object.defineProperty(exports, 'InjectReactive', {
enumerable: true,
get: function () {
return vuePropertyDecorator.InjectReactive;
}
});
Object.defineProperty(exports, 'Model', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Model;
}
});
Object.defineProperty(exports, 'Prop', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Prop;
}
});
Object.defineProperty(exports, 'PropSync', {
enumerable: true,
get: function () {
return vuePropertyDecorator.PropSync;
}
});
Object.defineProperty(exports, 'Provide', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Provide;
}
});
Object.defineProperty(exports, 'ProvideReactive', {
enumerable: true,
get: function () {
return vuePropertyDecorator.ProvideReactive;
}
});
Object.defineProperty(exports, 'Ref', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Ref;
}
});
Object.defineProperty(exports, 'Watch', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Watch;
}
});
exports.Component = Component__default;
Object.defineProperty(exports, 'mixins', {
enumerable: true,
get: function () {
return Component.mixins;
}
});
Object.defineProperty(exports, 'Module', {
enumerable: true,
get: function () {
return vuexModuleDecorators.Module;
}
});
Object.defineProperty(exports, 'MutationAction', {
enumerable: true,
get: function () {
return vuexModuleDecorators.MutationAction;
}
});
Object.defineProperty(exports, 'VuexAction', {
enumerable: true,
get: function () {
return vuexModuleDecorators.Action;
}
});
Object.defineProperty(exports, 'VuexModule', {
enumerable: true,
get: function () {
return vuexModuleDecorators.VuexModule;
}
});
Object.defineProperty(exports, 'VuexMutation', {
enumerable: true,
get: function () {
return vuexModuleDecorators.Mutation;
}
});
Object.defineProperty(exports, 'getModule', {
enumerable: true,
get: function () {
return vuexModuleDecorators.getModule;
}
});
Object.defineProperty(exports, 'Action', {
enumerable: true,
get: function () {
return vuexClass.Action;
}
});
Object.defineProperty(exports, 'Getter', {
enumerable: true,
get: function () {
return vuexClass.Getter;
}
});
Object.defineProperty(exports, 'Mutation', {
enumerable: true,
get: function () {
return vuexClass.Mutation;
}
});
Object.defineProperty(exports, 'State', {
enumerable: true,
get: function () {
return vuexClass.State;
}
});
Object.defineProperty(exports, 'namespace', {
enumerable: true,
get: function () {
return vuexClass.namespace;
}
});
exports.NextTick = NextTick;
exports.Off = Off;
exports.On = On;
exports.Once = Once;
//# sourceMappingURL=nuxt-property-decorator.common.js.map
@@ -1 +0,0 @@
{"version":3,"file":"nuxt-property-decorator.common.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
-33
View File
@@ -1,33 +0,0 @@
import Vue from "vue";
import { Emit, Inject, InjectReactive, Model, Prop, PropSync, Provide, ProvideReactive, Ref, Watch } from "vue-property-decorator";
import Component, { mixins } from "vue-class-component";
export declare type Constructor = {
new (...args: any[]): any;
};
/**
* decorator of $off
* @param event The name of the event
* @param method The name of the method
*/
export declare function Off(event?: string, method?: string): MethodDecorator;
/**
* decorator of $on
* @param event The name of the event
*/
export declare function On(event?: string): MethodDecorator;
/**
* decorator of $once
* @param event The name of the event
*/
export declare function Once(event?: string): MethodDecorator;
/**
* decorator of $nextTick
*
* @export
* @param {string} method
* @returns {MethodDecorator}
*/
export declare function NextTick(method: string): MethodDecorator;
import { Module, getModule, VuexModule, Mutation as VuexMutation, MutationAction, Action as VuexAction } from "vuex-module-decorators";
import { State, Getter, Action, Mutation, namespace } from "vuex-class";
export { Vue, Component, Emit, Inject, InjectReactive, Model, Prop, PropSync, Provide, ProvideReactive, Ref, Watch, mixins, State, Getter, Action, Mutation, namespace, Module, getModule, VuexModule, VuexMutation, MutationAction, VuexAction, };
-126
View File
@@ -1,126 +0,0 @@
export { default as Vue } from 'vue';
export { Emit, Inject, InjectReactive, Model, Prop, PropSync, Provide, ProvideReactive, Ref, Watch } from 'vue-property-decorator';
import Component, { createDecorator } from 'vue-class-component';
export { default as Component, mixins } from 'vue-class-component';
export { Module, MutationAction, Action as VuexAction, VuexModule, Mutation as VuexMutation, getModule } from 'vuex-module-decorators';
export { Action, Getter, Mutation, State, namespace } from 'vuex-class';
Component.registerHooks([
"beforeRouteEnter",
"beforeRouteUpdate",
"beforeRouteLeave",
"asyncData",
"fetch",
"head",
"key",
"layout",
"loading",
"middleware",
"scrollToTop",
"transition",
"validate",
"watchQuery",
"meta",
]);
// Code copied from Vue/src/shared/util.js
var hyphenateRE = /\B([A-Z])/g;
var hyphenate = function (str) { return str.replace(hyphenateRE, "-$1").toLowerCase(); };
/**
* decorator of $off
* @param event The name of the event
* @param method The name of the method
*/
function Off(event, method) {
return function (target, key, descriptor) {
key = hyphenate(key);
var original = descriptor.value;
descriptor.value = function offer() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (original.apply(this, args) !== false) {
if (method) {
if (typeof this[method] === "function") {
this.$off(event || key, this[method]);
}
else {
throw new TypeError("must be a method name");
}
}
else if (event) {
this.$off(event || key);
}
else {
this.$off();
}
}
};
};
}
/**
* decorator of $on
* @param event The name of the event
*/
function On(event) {
return createDecorator(function (componentOptions, k) {
var key = hyphenate(k);
if (typeof componentOptions.created !== "function") {
componentOptions.created = function () { };
}
var original = componentOptions.created;
componentOptions.created = function () {
original();
if (typeof componentOptions.methods !== "undefined") {
this.$on(event || key, componentOptions.methods[k]);
}
};
});
}
/**
* decorator of $once
* @param event The name of the event
*/
function Once(event) {
return createDecorator(function (componentOptions, k) {
var key = hyphenate(k);
if (typeof componentOptions.created !== "function") {
componentOptions.created = function () { };
}
var original = componentOptions.created;
componentOptions.created = function () {
original();
if (typeof componentOptions.methods !== "undefined") {
this.$once(event || key, componentOptions.methods[k]);
}
};
});
}
/**
* decorator of $nextTick
*
* @export
* @param {string} method
* @returns {MethodDecorator}
*/
function NextTick(method) {
return function (target, key, descriptor) {
var original = descriptor.value;
descriptor.value = function emitter() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (original.apply(this, args) !== false)
if (typeof this[method] === "function") {
this.$nextTick(this[method]);
}
else {
throw new TypeError("must be a method name");
}
};
};
}
export { NextTick, Off, On, Once };
//# sourceMappingURL=nuxt-property-decorator.esm.js.map
@@ -1 +0,0 @@
{"version":3,"file":"nuxt-property-decorator.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
-268
View File
@@ -1,268 +0,0 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('vue-property-decorator'), require('vue-class-component'), require('vuex-module-decorators'), require('vuex-class')) :
typeof define === 'function' && define.amd ? define(['exports', 'vue', 'vue-property-decorator', 'vue-class-component', 'vuex-module-decorators', 'vuex-class'], factory) :
(global = global || self, factory(global.NuxtPropertyDecorator = {}, global.Vue, global.VuePropertyDecorator, global.VueClassComponent, global.vuexModuleDecorators, global.VuexClass));
}(this, (function (exports, vue, vuePropertyDecorator, Component, vuexModuleDecorators, vuexClass) { 'use strict';
vue = vue && Object.prototype.hasOwnProperty.call(vue, 'default') ? vue['default'] : vue;
var Component__default = 'default' in Component ? Component['default'] : Component;
Component__default.registerHooks([
"beforeRouteEnter",
"beforeRouteUpdate",
"beforeRouteLeave",
"asyncData",
"fetch",
"head",
"key",
"layout",
"loading",
"middleware",
"scrollToTop",
"transition",
"validate",
"watchQuery",
"meta",
]);
// Code copied from Vue/src/shared/util.js
var hyphenateRE = /\B([A-Z])/g;
var hyphenate = function (str) { return str.replace(hyphenateRE, "-$1").toLowerCase(); };
/**
* decorator of $off
* @param event The name of the event
* @param method The name of the method
*/
function Off(event, method) {
return function (target, key, descriptor) {
key = hyphenate(key);
var original = descriptor.value;
descriptor.value = function offer() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (original.apply(this, args) !== false) {
if (method) {
if (typeof this[method] === "function") {
this.$off(event || key, this[method]);
}
else {
throw new TypeError("must be a method name");
}
}
else if (event) {
this.$off(event || key);
}
else {
this.$off();
}
}
};
};
}
/**
* decorator of $on
* @param event The name of the event
*/
function On(event) {
return Component.createDecorator(function (componentOptions, k) {
var key = hyphenate(k);
if (typeof componentOptions.created !== "function") {
componentOptions.created = function () { };
}
var original = componentOptions.created;
componentOptions.created = function () {
original();
if (typeof componentOptions.methods !== "undefined") {
this.$on(event || key, componentOptions.methods[k]);
}
};
});
}
/**
* decorator of $once
* @param event The name of the event
*/
function Once(event) {
return Component.createDecorator(function (componentOptions, k) {
var key = hyphenate(k);
if (typeof componentOptions.created !== "function") {
componentOptions.created = function () { };
}
var original = componentOptions.created;
componentOptions.created = function () {
original();
if (typeof componentOptions.methods !== "undefined") {
this.$once(event || key, componentOptions.methods[k]);
}
};
});
}
/**
* decorator of $nextTick
*
* @export
* @param {string} method
* @returns {MethodDecorator}
*/
function NextTick(method) {
return function (target, key, descriptor) {
var original = descriptor.value;
descriptor.value = function emitter() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (original.apply(this, args) !== false)
if (typeof this[method] === "function") {
this.$nextTick(this[method]);
}
else {
throw new TypeError("must be a method name");
}
};
};
}
exports.Vue = vue;
Object.defineProperty(exports, 'Emit', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Emit;
}
});
Object.defineProperty(exports, 'Inject', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Inject;
}
});
Object.defineProperty(exports, 'InjectReactive', {
enumerable: true,
get: function () {
return vuePropertyDecorator.InjectReactive;
}
});
Object.defineProperty(exports, 'Model', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Model;
}
});
Object.defineProperty(exports, 'Prop', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Prop;
}
});
Object.defineProperty(exports, 'PropSync', {
enumerable: true,
get: function () {
return vuePropertyDecorator.PropSync;
}
});
Object.defineProperty(exports, 'Provide', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Provide;
}
});
Object.defineProperty(exports, 'ProvideReactive', {
enumerable: true,
get: function () {
return vuePropertyDecorator.ProvideReactive;
}
});
Object.defineProperty(exports, 'Ref', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Ref;
}
});
Object.defineProperty(exports, 'Watch', {
enumerable: true,
get: function () {
return vuePropertyDecorator.Watch;
}
});
exports.Component = Component__default;
Object.defineProperty(exports, 'mixins', {
enumerable: true,
get: function () {
return Component.mixins;
}
});
Object.defineProperty(exports, 'Module', {
enumerable: true,
get: function () {
return vuexModuleDecorators.Module;
}
});
Object.defineProperty(exports, 'MutationAction', {
enumerable: true,
get: function () {
return vuexModuleDecorators.MutationAction;
}
});
Object.defineProperty(exports, 'VuexAction', {
enumerable: true,
get: function () {
return vuexModuleDecorators.Action;
}
});
Object.defineProperty(exports, 'VuexModule', {
enumerable: true,
get: function () {
return vuexModuleDecorators.VuexModule;
}
});
Object.defineProperty(exports, 'VuexMutation', {
enumerable: true,
get: function () {
return vuexModuleDecorators.Mutation;
}
});
Object.defineProperty(exports, 'getModule', {
enumerable: true,
get: function () {
return vuexModuleDecorators.getModule;
}
});
Object.defineProperty(exports, 'Action', {
enumerable: true,
get: function () {
return vuexClass.Action;
}
});
Object.defineProperty(exports, 'Getter', {
enumerable: true,
get: function () {
return vuexClass.Getter;
}
});
Object.defineProperty(exports, 'Mutation', {
enumerable: true,
get: function () {
return vuexClass.Mutation;
}
});
Object.defineProperty(exports, 'State', {
enumerable: true,
get: function () {
return vuexClass.State;
}
});
Object.defineProperty(exports, 'namespace', {
enumerable: true,
get: function () {
return vuexClass.namespace;
}
});
exports.NextTick = NextTick;
exports.Off = Off;
exports.On = On;
exports.Once = Once;
Object.defineProperty(exports, '__esModule', { value: true });
})));
-122
View File
@@ -1,122 +0,0 @@
{
"_args": [
[
"nuxt-property-decorator@2.7.2",
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
]
],
"_from": "nuxt-property-decorator@2.7.2",
"_id": "nuxt-property-decorator@2.7.2",
"_inBundle": false,
"_integrity": "sha512-B80C7APpniIziuTS2uLLRostYYeuinP+yxRgG1m3Q7ErRxXqAefPe+18pxGi9spt4PMTSmpijgOXx3lCKL7B8g==",
"_location": "/nuxt-property-decorator",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "nuxt-property-decorator@2.7.2",
"name": "nuxt-property-decorator",
"escapedName": "nuxt-property-decorator",
"rawSpec": "2.7.2",
"saveSpec": null,
"fetchSpec": "2.7.2"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/nuxt-property-decorator/-/nuxt-property-decorator-2.7.2.tgz",
"_spec": "2.7.2",
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
"author": {
"name": "davidbernal"
},
"browser": "lib/nuxt-property-decorator.umd.js",
"bugs": {
"url": "https://github.com/nuxt-community/nuxt-property-decorator/issues"
},
"contributors": [
{
"name": "Tony BRIET",
"email": "tony.briet@viacesi.fr"
},
{
"name": "HG",
"email": "husayt@gmail.com"
}
],
"dependencies": {
"vue-class-component": "7.2.3",
"vue-property-decorator": "^8.4.1",
"vuex": "^3.2.0",
"vuex-class": "^0.3.2",
"vuex-module-decorators": "^0.16.1"
},
"description": "Property decorators for Nuxt",
"devDependencies": {
"@std/esm": "^0.26.0",
"@types/jest": "^25.1.2",
"@types/node": "12.11.1",
"@vue/test-utils": "^1.0.0-beta.29",
"babel-jest": "^25.1.0",
"jest": "^25.1.0",
"rollup": "^2.6.1",
"rollup-plugin-typescript2": "^0.27.0",
"standard-version": "^7.1.0",
"ts-jest": "^25.4.0",
"ts-node": "^8.9.0",
"typedoc": "^0.17.0-3",
"typescript": "^3.8.3",
"vue": "^2.6.11",
"vue-jest": "^3.0.5",
"vue-template-compiler": "^2.6.11",
"yorkie": "^2.0.0"
},
"directories": {
"lib": "lib",
"test": "test"
},
"files": [
"lib"
],
"gitHooks": {
"pre-commit": "npm run build"
},
"homepage": "https://github.com/nuxt-community/nuxt-property-decorator#readme",
"jest": {
"transform": {
"^.+\\.tsx?$": "ts-jest",
"^.+\\.js$": "<rootDir>/node_modules/babel-jest"
},
"testRegex": "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
},
"keywords": [
"vue",
"typescript",
"nuxt",
"decorator"
],
"license": "MIT",
"main": "lib/nuxt-property-decorator.common.js",
"module": "lib/nuxt-property-decorator.esm.js",
"name": "nuxt-property-decorator",
"repository": {
"type": "git",
"url": "git+https://github.com/nuxt-community/nuxt-property-decorator.git"
},
"scripts": {
"build": "rollup -c",
"release": "standard-version && git push --follow-tags && npm publish",
"test": "jest",
"tsdoc": "typedoc --excludeNotExported --mode library --out docs/ src/"
},
"typings": "lib/nuxt-property-decorator.d.ts",
"version": "2.7.2"
}