vue-cli-plugin-nbcs-score-components
Advanced tools
Comparing version 1.0.12 to 1.0.13-alpha.1
@@ -74,3 +74,3 @@ const utils = require('../utils.js'); | ||
} | ||
// api.extendPackaeg doesn't work when we do this from the root, so write package.json manually. | ||
// api.extendPackage doesn't work when we do this from the root, so write package.json manually. | ||
let opts = { | ||
@@ -81,6 +81,6 @@ private: false, | ||
'dependencies.cross-env': "^7.0.2", | ||
'dependencies.vue-cli-plugin-nbcs-score-components': "^1.0.11-alpha.3" | ||
'dependencies.vue-cli-plugin-nbcs-score-components': "^1.0.13" | ||
} | ||
// Onl;y set the version for organism - otherwise we're likely overwritting | ||
// the version becausethe vue cli project is not actually new. | ||
// Only set the version for organism - otherwise we're likely overwriting | ||
// the version because the vue cli project is not actually new. | ||
if (isFull) opts.version = '0.0.0'; | ||
@@ -87,0 +87,0 @@ utils.writeToPackageFile(opts); |
@@ -86,5 +86,5 @@ import { shallowMount } from "@vue/test-utils"; | ||
// TODO Update me! | ||
if ('dummy computed tests', () => { | ||
it ('dummy computed tests', () => { | ||
expect(wrapper.vm.dummyComputed).toEqual('some value'); | ||
}); | ||
}); |
@@ -86,5 +86,5 @@ import { shallowMount } from "@vue/test-utils"; | ||
// TODO Update me! | ||
if ('dummy computed tests', () => { | ||
it ('dummy computed tests', () => { | ||
expect(wrapper.vm.dummyComputed).toEqual('some value'); | ||
}); | ||
}); |
@@ -86,5 +86,5 @@ import { shallowMount } from "@vue/test-utils"; | ||
// TODO Update me! | ||
if ('dummy computed tests', () => { | ||
it ('dummy computed tests', () => { | ||
expect(wrapper.vm.dummyComputed).toEqual('some value'); | ||
}); | ||
}); |
{ | ||
"name": "vue-cli-plugin-nbcs-score-components", | ||
"version": "1.0.12", | ||
"version": "1.0.13-alpha.1", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/NBC-Sports-Group/s-core-cli", |
19
utils.js
@@ -400,12 +400,15 @@ const fs = require("fs"); | ||
const getVueProps = async (relativeFilePath) => { | ||
console.dir | ||
let props = {}; | ||
const filename = resolvePath(relativeFilePath); | ||
const tempFilename = resolvePath('tests/unit/temp.js'); | ||
let data = fs.readFileSync(filename, 'utf8'); | ||
let exportString = data.match(/<script>(.|\s)*<\/script>/); | ||
let defaultData = exportString[0].replace(/(<script>|<\/script>|export default)/gi, '').trim(); | ||
fs.writeFileSync(tempFilename, `module.exports = ${defaultData}`); | ||
let component = require(tempFilename); | ||
checkRemove(tempFilename); | ||
return component.props; | ||
let data = fs.readFileSync(filename, 'utf8').replace(/\n|\/\/.*/gi, ''); | ||
let exportString = data.trim().match(/<script>(.|\n|\s).*<\/script>/gi); | ||
if (exportString && exportString.length) { | ||
let defaultData = exportString[0].replace(/(<script>|<\/script>|export default)/gi, '').trim(); | ||
fs.writeFileSync(tempFilename, `module.exports = ${defaultData}`); | ||
let component = require(tempFilename); | ||
checkRemove(tempFilename); | ||
props = component.props; | ||
} | ||
return props; | ||
} | ||
@@ -412,0 +415,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
38990
1042
3