vue-inbrowser-compiler
Advanced tools
Comparing version 3.13.8 to 3.13.10
@@ -6,4 +6,16 @@ # Change Log | ||
## [3.13.10](https://github.com/vue-styleguidist/vue-styleguidist/compare/v3.13.9...v3.13.10) (2019-06-04) | ||
### Bug Fixes | ||
* detect pure template no script as sfc ([e2a0a48](https://github.com/vue-styleguidist/vue-styleguidist/commit/e2a0a48)) | ||
* downgrade acorn ([40b60cb](https://github.com/vue-styleguidist/vue-styleguidist/commit/40b60cb)) | ||
## [3.13.8](https://github.com/vue-styleguidist/vue-styleguidist/compare/v3.13.7...v3.13.8) (2019-05-29) | ||
**Note:** Version bump only for package vue-inbrowser-compiler |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function isCodeVueSfc(code) { | ||
return /\n\W*<script/.test(code); | ||
return /\n\W*<script/.test(code) || /\n\W*<template/.test(code); | ||
} | ||
exports.default = isCodeVueSfc; |
{ | ||
"name": "vue-inbrowser-compiler", | ||
"version": "3.13.8", | ||
"version": "3.13.10", | ||
"description": "compile vue single file components right in your browser", | ||
@@ -19,3 +19,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"acorn": "^6.1.1", | ||
"acorn": "^5.7.3", | ||
"buble": "^0.19.7", | ||
@@ -30,3 +30,3 @@ "vue-template-compiler": "^2.6.10", | ||
"license": "MIT", | ||
"gitHead": "1d47e198a4705b38cf54a7d94efaa1bf93f6a7f6" | ||
"gitHead": "a6393e296e3f0e4451e7a32a34b3d4fbef30fc97" | ||
} |
@@ -17,2 +17,11 @@ import isCodeVueSfc from '../isCodeVueSfc' | ||
it('should detect a lonely template as SFC', () => { | ||
expect( | ||
isCodeVueSfc(` | ||
<template> | ||
<div/> | ||
</template>`) | ||
).toBeTruthy() | ||
}) | ||
it('should return false if there is only javascript', () => { | ||
@@ -19,0 +28,0 @@ expect( |
export default function isCodeVueSfc(code: string) { | ||
return /\n\W*<script/.test(code) | ||
return /\n\W*<script/.test(code) || /\n\W*<template/.test(code) | ||
} |
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
33816
913
+ Addedacorn@5.7.48.14.0(transitive)
Updatedacorn@^5.7.3