vue-prism-component
Advanced tools
Comparing version
'use strict'; | ||
function assign(obj) { | ||
var arguments$1 = arguments; | ||
for (var i = 1; i < arguments.length; i++) { | ||
// eslint-disable-next-line guard-for-in, prefer-rest-params | ||
for (var p in arguments[i]) { obj[p] = arguments$1[i][p]; } | ||
} | ||
return obj | ||
} | ||
var index = { | ||
@@ -28,5 +38,5 @@ functional: true, | ||
'pre', | ||
{ | ||
class: className | ||
}, | ||
assign({}, ctx.data, { | ||
class: [ctx.data.class, className] | ||
}), | ||
[ | ||
@@ -33,0 +43,0 @@ h('code', { |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global.PrismComponent = factory()); | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
(global.PrismComponent = factory()); | ||
}(this, (function () { 'use strict'; | ||
function assign(obj) { | ||
var arguments$1 = arguments; | ||
for (var i = 1; i < arguments.length; i++) { | ||
// eslint-disable-next-line guard-for-in, prefer-rest-params | ||
for (var p in arguments[i]) { obj[p] = arguments$1[i][p]; } | ||
} | ||
return obj | ||
} | ||
var index = { | ||
@@ -24,3 +34,3 @@ functional: true, | ||
if ("development" === 'development' && !prismLanguage) { | ||
if ("production" === 'development' && !prismLanguage) { | ||
throw new Error( | ||
@@ -33,5 +43,5 @@ ("Prism component for language \"" + language + "\" was not found, did you forget to register it? See all available ones: https://cdn.jsdelivr.net/npm/prismjs/components/") | ||
'pre', | ||
{ | ||
class: className | ||
}, | ||
assign({}, ctx.data, { | ||
class: [ctx.data.class, className] | ||
}), | ||
[ | ||
@@ -38,0 +48,0 @@ h('code', { |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.PrismComponent=n()}(this,function(){"use strict";var e={functional:!0,props:{code:{type:String},language:{type:String,default:"markup"}},render:function(e,n){var t=n.props.code||n.children[0].text,r=n.props.language,o=Prism.languages[r],i="language-"+r;return e("pre",{class:i},[e("code",{class:i,domProps:{innerHTML:Prism.highlight(t,o)}})])}};return e}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.PrismComponent=n()}(this,function(){"use strict";function e(e){for(var n=arguments,t=1;t<arguments.length;t++)for(var r in arguments[t])e[r]=n[t][r];return e}return{functional:!0,props:{code:{type:String},language:{type:String,default:"markup"}},render:function(n,t){var r=t.props.code||t.children[0].text,o=t.props.language,a=Prism.languages[o],i="language-"+o;return n("pre",e({},t.data,{class:[t.data.class,i]}),[n("code",{class:i,domProps:{innerHTML:Prism.highlight(r,a)}})])}}}); | ||
//# sourceMappingURL=vue-prism-component.min.js.map |
{ | ||
"name": "vue-prism-component", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "vue component for prism.js", | ||
@@ -20,5 +20,4 @@ "repository": { | ||
"prepublish": "npm run build", | ||
"build": "npm run build:umd && npm run build:cjs && npm run build:compress", | ||
"build:umd": "bili --format umd --env.NODE_ENV development --module-name PrismComponent", | ||
"build:compress": "bili --format umd-compress --env.NODE_ENV production --module-name PrismComponent", | ||
"build": "npm run build:umd && npm run build:cjs", | ||
"build:umd": "bili --format umd,umdCompress --env.NODE_ENV production --module-name PrismComponent", | ||
"build:cjs": "bili --format cjs" | ||
@@ -30,5 +29,5 @@ }, | ||
"devDependencies": { | ||
"bili": "^0.16.0-rc.2", | ||
"bili": "^0.17.3", | ||
"eslint-config-rem": "^3.0.0", | ||
"poi": "^9.0.4", | ||
"poi": "^9.1.2", | ||
"prismjs": "^1.6.0", | ||
@@ -44,3 +43,6 @@ "xo": "^0.18.0" | ||
"Prism" | ||
] | ||
], | ||
"rules": { | ||
"import/prefer-default-export": 0 | ||
} | ||
}, | ||
@@ -47,0 +49,0 @@ "poi": { |
@@ -11,2 +11,4 @@ # vue-prism-component | ||
CDN: [UNPKG](https://unpkg.com/vue-prism-component/dist/) | [jsDelivr](https://cdn.jsdelivr.net/npm/vue-prism-component/dist/) | ||
## Usage | ||
@@ -13,0 +15,0 @@ |
Sorry, the diff of this file is not supported yet
103
19.77%87
2.35%8056
-2.07%