@chenfengyuan/create-vue-component
Advanced tools
Comparing version 1.0.0 to 1.1.0
# Changelog | ||
## 1.1.0 (Jun 28, 2018) | ||
- If the first argument is a function, then pass component instance (execution context) as the third argument to this function. | ||
## 1.0.0 (May 23, 2018) | ||
@@ -4,0 +8,0 @@ |
/*! | ||
* create-vue-component v1.0.0 | ||
* create-vue-component v1.1.0 | ||
* https://github.com/fengyuanchen/create-vue-component | ||
@@ -8,3 +8,3 @@ * | ||
* | ||
* Date: 2018-05-23T13:55:11.173Z | ||
* Date: 2018-06-28T13:45:18.559Z | ||
*/ | ||
@@ -122,3 +122,3 @@ | ||
component.render = function render(createElement) { | ||
return content.call(this, createElement, options.data); | ||
return content.call(this, createElement, options.data, this); | ||
}; | ||
@@ -125,0 +125,0 @@ } else { |
/*! | ||
* create-vue-component v1.0.0 | ||
* create-vue-component v1.1.0 | ||
* https://github.com/fengyuanchen/create-vue-component | ||
@@ -8,3 +8,3 @@ * | ||
* | ||
* Date: 2018-05-23T13:55:11.173Z | ||
* Date: 2018-06-28T13:45:18.559Z | ||
*/ | ||
@@ -120,3 +120,3 @@ | ||
component.render = function render(createElement) { | ||
return content.call(this, createElement, options.data); | ||
return content.call(this, createElement, options.data, this); | ||
}; | ||
@@ -123,0 +123,0 @@ } else { |
/*! | ||
* create-vue-component v1.0.0 | ||
* create-vue-component v1.1.0 | ||
* https://github.com/fengyuanchen/create-vue-component | ||
@@ -8,3 +8,3 @@ * | ||
* | ||
* Date: 2018-05-23T13:55:11.173Z | ||
* Date: 2018-06-28T13:45:18.559Z | ||
*/ | ||
@@ -126,3 +126,3 @@ | ||
component.render = function render(createElement) { | ||
return content.call(this, createElement, options.data); | ||
return content.call(this, createElement, options.data, this); | ||
}; | ||
@@ -129,0 +129,0 @@ } else { |
/*! | ||
* create-vue-component v1.0.0 | ||
* create-vue-component v1.1.0 | ||
* https://github.com/fengyuanchen/create-vue-component | ||
@@ -8,4 +8,4 @@ * | ||
* | ||
* Date: 2018-05-23T13:55:11.173Z | ||
* Date: 2018-06-28T13:45:18.559Z | ||
*/ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):t.createVueComponent=n()}(this,function(){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return void 0===t?"undefined":n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":n(t)};function o(t){return"object"===(void 0===t?"undefined":e(t))&&null!==t}var t=Object.prototype,r=t.hasOwnProperty,i=t.toString;function f(t){return"string"==typeof t&&0<t.trim().length}function u(t){return function(t){if(!o(t))return!1;try{var n=t.constructor,e=n.prototype;return n&&e&&r.call(e,"isPrototypeOf")}catch(t){return!1}}(t)&&(f(t.template)||"function"==typeof t.render||f(t.el)||o(e=t.el)&&1===e.nodeType&&-1<i.call(e).indexOf("Element")||u(t.extends)||(n=t.mixins,Array.isArray(n)&&0<n.length&&t.mixins.some(function(t){return u(t)})));var n,e}var c=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};return function(n){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t={};if(u(n))t=c({},n);else if("function"==typeof n)t.render=function(t){return n.call(this,t,e.data)};else{var o=e.tag||"span";t.template="<"+o+">"+n+"</"+o+">"}return t}}); | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):t.createVueComponent=n()}(this,function(){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return void 0===t?"undefined":n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":n(t)};function o(t){return"object"===(void 0===t?"undefined":e(t))&&null!==t}var t=Object.prototype,r=t.hasOwnProperty,i=t.toString;function f(t){return"string"==typeof t&&0<t.trim().length}function u(t){return function(t){if(!o(t))return!1;try{var n=t.constructor,e=n.prototype;return n&&e&&r.call(e,"isPrototypeOf")}catch(t){return!1}}(t)&&(f(t.template)||"function"==typeof t.render||f(t.el)||o(e=t.el)&&1===e.nodeType&&-1<i.call(e).indexOf("Element")||u(t.extends)||(n=t.mixins,Array.isArray(n)&&0<n.length&&t.mixins.some(function(t){return u(t)})));var n,e}var c=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};return function(n){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t={};if(u(n))t=c({},n);else if("function"==typeof n)t.render=function(t){return n.call(this,t,e.data,this)};else{var o=e.tag||"span";t.template="<"+o+">"+n+"</"+o+">"}return t}}); |
{ | ||
"name": "@chenfengyuan/create-vue-component", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Convert anything to a Vue component.", | ||
@@ -13,3 +13,3 @@ "main": "dist/create-vue-component.common.js", | ||
"name": "Chen Fengyuan", | ||
"url": "http://chenfengyuan.com" | ||
"url": "https://chenfengyuan.com" | ||
}, | ||
@@ -47,6 +47,6 @@ "files": [ | ||
"create-banner": "^1.0.0", | ||
"eslint": "^4.19.1", | ||
"eslint-config-airbnb-base": "^12.1.0", | ||
"eslint-plugin-import": "^2.12.0", | ||
"karma": "^2.0.2", | ||
"eslint": "^5.0.1", | ||
"eslint-config-airbnb-base": "^13.0.0", | ||
"eslint-plugin-import": "^2.13.0", | ||
"karma": "^2.0.4", | ||
"karma-chai": "^0.1.0", | ||
@@ -58,7 +58,7 @@ "karma-chrome-launcher": "^2.2.0", | ||
"mocha": "^5.2.0", | ||
"puppeteer": "^1.4.0", | ||
"rollup": "^0.59.2", | ||
"rollup-plugin-babel": "^3.0.4", | ||
"puppeteer": "^1.5.0", | ||
"rollup": "^0.62.0", | ||
"rollup-plugin-babel": "^3.0.5", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"uglify-js": "^3.3.27", | ||
"uglify-js": "^3.4.2", | ||
"vue": "^2.5.16", | ||
@@ -65,0 +65,0 @@ "vue-template-compiler": "^2.5.16" |
@@ -17,3 +17,3 @@ # create-vue-component | ||
## Install | ||
## Installation | ||
@@ -85,6 +85,8 @@ ```shell | ||
createVueComponent(function content(createElement, data) { | ||
return createElement('p', data) | ||
createVueComponent(function content(createElement, data, context) { | ||
return createElement('p', `Hello, ${data.name}!`); | ||
}, { | ||
data: 'Hello, World!', | ||
data: { | ||
name: 'World', | ||
}, | ||
}); | ||
@@ -111,2 +113,2 @@ // will render as: <p>Hello, World!</p> | ||
[MIT](http://opensource.org/licenses/MIT) © [Chen Fengyuan](http://chenfengyuan.com) | ||
[MIT](https://opensource.org/licenses/MIT) © [Chen Fengyuan](https://chenfengyuan.com) |
@@ -18,3 +18,3 @@ import isVueComponent from 'is-vue-component'; | ||
component.render = function render(createElement) { | ||
return content.call(this, createElement, options.data); | ||
return content.call(this, createElement, options.data, this); | ||
}; | ||
@@ -21,0 +21,0 @@ } else { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23959
112