@24i/smartapps-bigscreen-rnv-build-engine 0.10.3-alpha.1564 → 0.10.3-alpha.1565
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.
|
@@ -79,29 +79,29 @@ describe('generateSvgSpriteMap', () => {
|
|
|
79
79
|
expect(fs_1.default.existsSync(outputCssFilePath)).toBe(true);
|
|
80
80
|
const outputCssContentRows = fs_1.default.readFileSync(outputCssFilePath).toString().split('\n');
|
|
81
81
|
expect(outputCssContentRows).toHaveLength(15);
|
|
82
|
-
expect(outputCssContentRows[0]).toBe('.icon-icon1 {');
|
|
82
|
+
expect(outputCssContentRows[0]).toBe('.icon-svg-icon1 {');
|
|
83
83
|
expect(outputCssContentRows[1].startsWith(' background-image: url(')).toBe(true);
|
|
84
84
|
expect(outputCssContentRows[2]).toBe('}');
|
|
85
85
|
expect(outputCssContentRows[3]).toBe('');
|
|
86
|
-
expect(outputCssContentRows[4]).toBe('.icon-mask-icon1 {');
|
|
86
|
+
expect(outputCssContentRows[4]).toBe('.icon-mask-svg-icon1 {');
|
|
87
87
|
expect(outputCssContentRows[5].startsWith(' -webkit-mask-image: url(')).toBe(true);
|
|
88
88
|
expect(outputCssContentRows[6]).toBe('}');
|
|
89
89
|
expect(outputCssContentRows[7]).toBe('');
|
|
90
|
-
expect(outputCssContentRows[8]).toBe('.icon-icon2 {');
|
|
90
|
+
expect(outputCssContentRows[8]).toBe('.icon-svg-icon2 {');
|
|
91
91
|
expect(outputCssContentRows[9].startsWith(' background-image: url(')).toBe(true);
|
|
92
92
|
expect(outputCssContentRows[10]).toBe('}');
|
|
93
93
|
expect(outputCssContentRows[11]).toBe('');
|
|
94
|
-
expect(outputCssContentRows[12]).toBe('.icon-icon3 {');
|
|
94
|
+
expect(outputCssContentRows[12]).toBe('.icon-svg-icon3 {');
|
|
95
95
|
expect(outputCssContentRows[13].startsWith(' background-image: url(')).toBe(true);
|
|
96
96
|
expect(outputCssContentRows[14]).toBe('}');
|
|
97
97
|
const outputJsonPath = path_1.default.resolve(platformAssetsDir, 'svg_icons.json');
|
|
98
98
|
expect(fs_1.default.existsSync(outputJsonPath)).toBe(true);
|
|
99
99
|
const outputJsonContent = JSON.parse(fs_1.default.readFileSync(outputJsonPath).toString());
|
|
100
100
|
expect(outputJsonContent).toStrictEqual({
|
|
101
|
-
icon1: '',
|
|
102
|
-
icon2: '',
|
|
103
|
-
icon3: '',
|
|
104
|
-
'mask-icon1': '',
|
|
101
|
+
'svg-icon1': '',
|
|
102
|
+
'svg-icon2': '',
|
|
103
|
+
'svg-icon3': '',
|
|
104
|
+
'mask-svg-icon1': '',
|
|
105
105
|
});
|
|
106
106
|
});
|
|
107
107
|
});
|
|
@@ -28,7 +28,6 @@ const makeWebpackSpritesmithConfig = (projectDir, appBuildDir) => ({
|
|
|
28
28
|
apiOptions: {
|
|
29
29
|
cssImageRef: 'sprite.png',
|
|
30
30
|
generateSpriteName: (fullPathToSourceFile) => {
|
|
31
|
-
console.log('image:', fullPathToSourceFile);
|
|
32
31
|
const { name } = path_1.default.parse(fullPathToSourceFile);
|
|
33
32
|
return `png-${name}`;
|
|
34
33
|
},
|
|
@@ -85,7 +85,7 @@ const generateSvgSpriteMap = (c) => {
|
|
|
85
85
|
.filter((name) => name.endsWith('.svg'))
|
|
86
86
|
.map((fileName) => {
|
|
87
87
|
const maskListIncludesFileName = config.maskList.includes(fileName);
|
|
88
|
-
const spriteName = fileName
|
|
88
|
+
const spriteName = `svg-${fileName}`
|
|
89
89
|
.replace('.svg', '')
|
|
90
90
|
.replace(' ', '-')
|
|
91
91
|
.toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@24i/smartapps-bigscreen-rnv-build-engine",
|
|
3
|
-
"version": "0.10.3-alpha.
|
|
3
|
+
"version": "0.10.3-alpha.1565+2e445074",
|
|
4
4
|
"description": "Package with build engine for SmartApps BIGscreen projects... ",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"keywords": [],
|
|
62
62
|
"author": "24i",
|
|
63
63
|
"license": "ISC",
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "2e445074f92629194fc88f341d807c2bd311cf4d"
|
|
65
65
|
}
|