File tree Expand file tree Collapse file tree 12 files changed +161
-2
lines changed Expand file tree Collapse file tree 12 files changed +161
-2
lines changed Original file line number Diff line number Diff line change
1
+ const { createTransformer } = require ( 'babel-jest' ) . default
2
+ module . exports = createTransformer ( {
3
+ presets : [ '@babel/preset-env' ]
4
+ } )
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div >
3
+ <h1 class =" entry" >Entry</h1 >
4
+ <lib-component />
5
+ </div >
6
+ </template >
7
+
8
+ <script >
9
+ import LibComponent from ' vue2-sass-importer-lib/index.vue'
10
+
11
+ export default {
12
+ components: {
13
+ LibComponent
14
+ }
15
+ }
16
+ </script >
17
+
18
+ <style lang="scss" module>
19
+ @import ' ~vue2-sass-importer-sass-lib/index.scss' ;
20
+
21
+ .entry {
22
+ @include my-v2-mixin ;
23
+ }
24
+ </style >
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " vue2-sass-importer-entry" ,
3
+ "version" : " 1.0.0" ,
4
+ "license" : " MIT" ,
5
+ "private" : true ,
6
+ "scripts" : {
7
+ "test" : " jest --no-cache --coverage test.js"
8
+ },
9
+ "dependencies" : {
10
+ "vue" : " ^2.5.21" ,
11
+ "vue-template-compiler" : " ^2.5.21" ,
12
+ "vue2-sass-importer-lib" : " file:../lib" ,
13
+ "vue2-sass-importer-sass-lib" : " file:../sass-lib-v2"
14
+ },
15
+ "devDependencies" : {
16
+ "@babel/core" : " ^7.9.0" ,
17
+ "@babel/preset-env" : " ^7.9.0" ,
18
+ "@vue/test-utils" : " ^1.1.0" ,
19
+ "babel-jest" : " ^28.0.2" ,
20
+ "jest" : " 28.x" ,
21
+ "jest-environment-jsdom" : " 28.0.2" ,
22
+ "postcss" : " ^7.0.13" ,
23
+ "postcss-color-function" : " ^4.0.1" ,
24
+ "sass" : " ^1.23.7" ,
25
+ "@vue/vue2-jest" : " ^28.0.0"
26
+ },
27
+ "jest" : {
28
+ "testEnvironment" : " jsdom" ,
29
+ "moduleFileExtensions" : [
30
+ " js" ,
31
+ " json" ,
32
+ " vue"
33
+ ],
34
+ "transformIgnorePatterns" : [
35
+ " /node_modules/.*(?<!.vue)$"
36
+ ],
37
+ "transform" : {
38
+ "^.+\\ .js$" : " ./babel-transformer.js" ,
39
+ "^.+\\ .vue$" : " @vue/vue2-jest"
40
+ },
41
+ "globals" : {
42
+ "vue-jest" : {
43
+ "transform" : {
44
+ "^js$" : " ./babel-transformer.js"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
Original file line number Diff line number Diff line change
1
+ import { mount } from '@vue/test-utils'
2
+ import Entry from './components/Entry.vue'
3
+
4
+ test ( 'processes sass imports relative to current file' , ( ) => {
5
+ const wrapper = mount ( Entry )
6
+ expect ( wrapper ) . toBeDefined ( )
7
+ } )
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div class =" lib-class" >Lib Component</div >
3
+ </template >
4
+
5
+ <style lang="scss" module>
6
+ @import ' ~vue2-sass-importer-sass-lib/index.scss' ;
7
+
8
+ .lib-class {
9
+ @include my-v1-mixin ;
10
+ }
11
+ </style >
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " vue2-sass-importer-lib" ,
3
+ "version" : " 1.0.0" ,
4
+ "license" : " MIT" ,
5
+ "private" : true ,
6
+ "main" : " index.vue" ,
7
+ "files" : [
8
+ " index.vue"
9
+ ],
10
+ "scripts" : {
11
+ "test" : " echo 'No tests found.'"
12
+ },
13
+ "dependencies" : {
14
+ "vue2-sass-importer-sass-lib" : " file:../sass-lib-v1"
15
+ },
16
+ "peerDependencies" : {
17
+ "vue" : " ^2.5.21"
18
+ }
19
+ }
Original file line number Diff line number Diff line change
1
+ @mixin my-v1-mixin {
2
+ color : blue ;
3
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " vue2-sass-importer-sass-lib" ,
3
+ "version" : " 1.0.0" ,
4
+ "license" : " MIT" ,
5
+ "private" : true ,
6
+ "files" : [
7
+ " index.scss"
8
+ ],
9
+ "scripts" : {
10
+ "test" : " echo 'No tests found.'"
11
+ }
12
+ }
Original file line number Diff line number Diff line change
1
+ @mixin my-v2-mixin {
2
+ color : red ;
3
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " vue2-sass-importer-sass-lib" ,
3
+ "version" : " 2.0.0" ,
4
+ "license" : " MIT" ,
5
+ "private" : true ,
6
+ "files" : [
7
+ " index.scss"
8
+ ],
9
+ "scripts" : {
10
+ "test" : " echo 'No tests found.'"
11
+ }
12
+ }
Original file line number Diff line number Diff line change 8
8
"workspaces" : {
9
9
"packages" : [
10
10
" packages/*" ,
11
- " e2e/**"
11
+ " e2e/2.x/*" ,
12
+ " e2e/2.x/**/entry" ,
13
+ " e2e/3.x/*" ,
14
+ " e2e/3.x/**/entry"
12
15
],
13
16
"nohoist" : [
14
- " **/vue"
17
+ " **/vue" ,
18
+ " **/vue2-sass-importer-sass-lib"
15
19
]
16
20
},
17
21
"scripts" : {
Original file line number Diff line number Diff line change @@ -10865,6 +10865,17 @@ vue-template-es2015-compiler@^1.9.0:
10865
10865
resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825"
10866
10866
integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==
10867
10867
10868
+ " vue2-sass-importer-lib@file:e2e/2.x/sass-importer/lib " :
10869
+ version "1.0.0"
10870
+ dependencies :
10871
+ vue2-sass-importer-sass-lib "file:../../.cache/yarn/v6/npm-vue2-sass-importer-lib-1.0.0-c953c300-a005-492f-9652-a1024a3a28b9-1656106782763/node_modules/sass-lib-v1"
10872
+
10873
+ " vue2-sass-importer-sass-lib@file:e2e/2.x/sass-importer/sass-lib-v1 " :
10874
+ version "1.0.0"
10875
+
10876
+ " vue2-sass-importer-sass-lib@file:e2e/2.x/sass-importer/sass-lib-v2 " :
10877
+ version "2.0.0"
10878
+
10868
10879
vue@^2.4.2, vue@^2.5.21 :
10869
10880
version "2.6.14"
10870
10881
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.14.tgz#e51aa5250250d569a3fbad3a8a5a687d6036e235"
You can’t perform that action at this time.
0 commit comments