detective-vue2 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -13
- package/package.json +9 -12
package/index.js
CHANGED
|
@@ -7,8 +7,6 @@ const detectiveScss = require('detective-scss')
|
|
|
7
7
|
const detectiveStylus = require('detective-stylus')
|
|
8
8
|
const detectiveSass = require('detective-sass')
|
|
9
9
|
|
|
10
|
-
const isVue3 = typeof compiler.parseComponent === 'undefined';
|
|
11
|
-
|
|
12
10
|
/**
|
|
13
11
|
* Extracts the dependencies of the supplied Vue module
|
|
14
12
|
*/
|
|
@@ -16,17 +14,9 @@ module.exports = function vueDetective(fileContent, opts) {
|
|
|
16
14
|
if (typeof fileContent === 'undefined') throw new Error('content not given');
|
|
17
15
|
if (typeof fileContent !== 'string') throw new Error('content is not a string');
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const result = compiler.parse(fileContent, {sourceMap: false})
|
|
23
|
-
styles = result.descriptor.styles;
|
|
24
|
-
script = result.descriptor.script;
|
|
25
|
-
} else {
|
|
26
|
-
const result = compiler.parse({source: fileContent, sourceMap: false})
|
|
27
|
-
styles = result.styles;
|
|
28
|
-
script = result.script;
|
|
29
|
-
}
|
|
17
|
+
const result = compiler.parse(fileContent, {sourceMap: false})
|
|
18
|
+
const styles = result.descriptor.styles;
|
|
19
|
+
const script = result.descriptor.script;
|
|
30
20
|
|
|
31
21
|
const dependencies = [];
|
|
32
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "detective-vue2",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"author": "Havunen <sampo.kivisto@live.fi>",
|
|
5
5
|
"description": "Get the dependencies of a Vue module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -30,19 +30,16 @@
|
|
|
30
30
|
},
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"homepage": "https://github.com/dependents/detective-typescript",
|
|
33
|
-
"peerDependencies": {
|
|
34
|
-
"@vue/compiler-sfc": ">= 2 < 4"
|
|
35
|
-
},
|
|
36
33
|
"dependencies": {
|
|
37
|
-
"
|
|
38
|
-
"detective-
|
|
39
|
-
"detective-
|
|
40
|
-
"detective-
|
|
41
|
-
"detective-
|
|
34
|
+
"@vue/compiler-sfc": ">=3",
|
|
35
|
+
"detective-es6": ">=4",
|
|
36
|
+
"detective-sass": ">=5",
|
|
37
|
+
"detective-scss": ">=4",
|
|
38
|
+
"detective-stylus": ">=4",
|
|
39
|
+
"detective-typescript": ">=11"
|
|
42
40
|
},
|
|
43
41
|
"devDependencies": {
|
|
44
|
-
"eslint": "^8.
|
|
45
|
-
"mocha": "^10.2.0"
|
|
46
|
-
"@vue/compiler-sfc": "^2.7.14"
|
|
42
|
+
"eslint": "^8.48.0",
|
|
43
|
+
"mocha": "^10.2.0"
|
|
47
44
|
}
|
|
48
45
|
}
|