vue-inbrowser-compiler-utils
Advanced tools
Comparing version 4.53.1 to 4.54.1
# Change Log | ||
## 4.54.1 | ||
### Patch Changes | ||
- [#1397](https://github.com/vue-styleguidist/vue-styleguidist/pull/1397) [`c9cf522d`](https://github.com/vue-styleguidist/vue-styleguidist/commit/c9cf522d4a1ea574feeb751477ba4edbd247b20d) Thanks [@elevatebart](https://github.com/elevatebart)! - fix: editor sfc issues | ||
- Updated dependencies [[`c9cf522d`](https://github.com/vue-styleguidist/vue-styleguidist/commit/c9cf522d4a1ea574feeb751477ba4edbd247b20d)]: | ||
- vue-inbrowser-compiler-demi@4.54.1 | ||
- vue-inbrowser-compiler-independent-utils@4.54.1 | ||
## 4.53.1 | ||
@@ -4,0 +14,0 @@ |
@@ -1,4 +0,5 @@ | ||
export { Vue2, isVue3, compileScript, createApp, h, compileTemplate, App } from 'vue-inbrowser-compiler-demi'; | ||
export { cleanName, addScopedStyle, parseComponent, isCodeVueSfc, getDefaultExample, EvaluableComponent, } from 'vue-inbrowser-compiler-independent-utils'; | ||
export { Vue2, isVue3, compileScript, createApp, h, parseComponent, compileTemplate, App } from 'vue-inbrowser-compiler-demi'; | ||
export { cleanName, addScopedStyle, getDefaultExample, EvaluableComponent, } from 'vue-inbrowser-compiler-independent-utils'; | ||
export { default as adaptCreateElement, concatenate } from './adaptCreateElement'; | ||
export { default as isCodeVueSfc } from './isCodeVueSfc'; | ||
export * from './compileTemplateForEval'; |
@@ -156,2 +156,12 @@ 'use strict'; | ||
/** | ||
* Determines if the given code is a VueSfc file | ||
* It does not throw if the code is invalid, just returns `false` | ||
* @param code JavaScript or vue code to analyze | ||
*/ | ||
function isCodeVueSfc(code) { | ||
const parts = vueInbrowserCompilerDemi.parseComponent(code); | ||
return !!parts.script || !!parts.template; | ||
} | ||
const EXAMPLE_FILENAME = 'example.vue'; | ||
@@ -213,2 +223,6 @@ function compileTemplateForEval(compiledComponent) { | ||
}); | ||
Object.defineProperty(exports, 'parseComponent', { | ||
enumerable: true, | ||
get: function () { return vueInbrowserCompilerDemi.parseComponent; } | ||
}); | ||
Object.defineProperty(exports, 'addScopedStyle', { | ||
@@ -226,12 +240,5 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(exports, 'isCodeVueSfc', { | ||
enumerable: true, | ||
get: function () { return vueInbrowserCompilerIndependentUtils.isCodeVueSfc; } | ||
}); | ||
Object.defineProperty(exports, 'parseComponent', { | ||
enumerable: true, | ||
get: function () { return vueInbrowserCompilerIndependentUtils.parseComponent; } | ||
}); | ||
exports.adaptCreateElement = adaptCreateElement; | ||
exports.compileTemplateForEval = compileTemplateForEval; | ||
exports.concatenate = concatenate; | ||
exports.isCodeVueSfc = isCodeVueSfc; |
@@ -1,4 +0,4 @@ | ||
import { isVue3, compileScript, compileTemplate } from 'vue-inbrowser-compiler-demi'; | ||
export { Vue2, compileScript, compileTemplate, createApp, h, isVue3 } from 'vue-inbrowser-compiler-demi'; | ||
export { addScopedStyle, cleanName, getDefaultExample, isCodeVueSfc, parseComponent } from 'vue-inbrowser-compiler-independent-utils'; | ||
import { isVue3, parseComponent, compileScript, compileTemplate } from 'vue-inbrowser-compiler-demi'; | ||
export { Vue2, compileScript, compileTemplate, createApp, h, isVue3, parseComponent } from 'vue-inbrowser-compiler-demi'; | ||
export { addScopedStyle, cleanName, getDefaultExample } from 'vue-inbrowser-compiler-independent-utils'; | ||
import camelCase from 'camelcase'; | ||
@@ -149,2 +149,12 @@ | ||
/** | ||
* Determines if the given code is a VueSfc file | ||
* It does not throw if the code is invalid, just returns `false` | ||
* @param code JavaScript or vue code to analyze | ||
*/ | ||
function isCodeVueSfc(code) { | ||
const parts = parseComponent(code); | ||
return !!parts.script || !!parts.template; | ||
} | ||
const EXAMPLE_FILENAME = 'example.vue'; | ||
@@ -182,2 +192,2 @@ function compileTemplateForEval(compiledComponent) { | ||
export { adaptCreateElement, compileTemplateForEval, concatenate }; | ||
export { adaptCreateElement, compileTemplateForEval, concatenate, isCodeVueSfc }; |
{ | ||
"name": "vue-inbrowser-compiler-utils", | ||
"version": "4.53.1", | ||
"version": "4.54.1", | ||
"description": "use this with vue-inbrowser-compiler to allow jsx compilation", | ||
@@ -17,4 +17,4 @@ "module": "lib/vue-inbrowser-compiler-utils.esm.js", | ||
"camelcase": "^5.3.1", | ||
"vue-inbrowser-compiler-demi": "^4.53.1", | ||
"vue-inbrowser-compiler-independent-utils": "^4.52.0" | ||
"vue-inbrowser-compiler-demi": "^4.54.1", | ||
"vue-inbrowser-compiler-independent-utils": "^4.54.1" | ||
}, | ||
@@ -21,0 +21,0 @@ "devDependencies": { |
@@ -7,2 +7,3 @@ export { | ||
h, | ||
parseComponent, | ||
compileTemplate, | ||
@@ -14,4 +15,2 @@ App | ||
addScopedStyle, | ||
parseComponent, | ||
isCodeVueSfc, | ||
getDefaultExample, | ||
@@ -21,2 +20,3 @@ EvaluableComponent, | ||
export { default as adaptCreateElement, concatenate } from './adaptCreateElement' | ||
export { default as isCodeVueSfc } from './isCodeVueSfc' | ||
export * from './compileTemplateForEval' |
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
44497
18
770