@24i/smartapps-bigscreen-rnv-build-engine 0.10.3-alpha.1562 → 0.10.3-alpha.1563
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.
|
@@ -89,14 +89,21 @@ describe('mergeSvgAndPngIcons', () => {
|
|
|
89
89
|
});
|
|
90
90
|
});
|
|
91
91
|
it('should create blank icons files from when nothing exists', () => {
|
|
92
|
-
(0, child_process_1.execSync)(`rm -rf ${pngCssFilePath}`);
|
|
93
|
-
(0, child_process_1.execSync)(`rm -rf ${pngJsonFilePath}`);
|
|
94
92
|
(0, child_process_1.execSync)(`rm -rf ${svgCssFilePath}`);
|
|
95
93
|
(0, child_process_1.execSync)(`rm -rf ${svgJsonFilePath}`);
|
|
94
|
+
(0, child_process_1.execSync)(`rm -rf ${pngCssFilePath}`);
|
|
95
|
+
(0, child_process_1.execSync)(`rm -rf ${pngJsonFilePath}`);
|
|
96
96
|
(0, mergeSvgAndPngIcons_1.mergeSvgAndPngIcons)(rnvC);
|
|
97
97
|
const mergedCssContentRows = fs_1.default.readFileSync(mergedCssFilePath).toString();
|
|
98
98
|
expect(mergedCssContentRows).toHaveLength(0);
|
|
99
99
|
const mergedJsonContent = JSON.parse(fs_1.default.readFileSync(mergedJsonFilePath).toString());
|
|
100
100
|
expect(mergedJsonContent).toMatchObject({});
|
|
101
101
|
});
|
|
102
|
+
it('should remove svg_icons.css and png_icons.css after merge', () => {
|
|
103
|
+
(0, mergeSvgAndPngIcons_1.mergeSvgAndPngIcons)(rnvC);
|
|
104
|
+
expect(fs_1.default.existsSync(mergedCssFilePath)).toBeTruthy();
|
|
105
|
+
expect(fs_1.default.existsSync(mergedJsonFilePath)).toBeTruthy();
|
|
106
|
+
expect(fs_1.default.existsSync(svgCssFilePath)).toBeFalsy();
|
|
107
|
+
expect(fs_1.default.existsSync(pngCssFilePath)).toBeFalsy();
|
|
108
|
+
});
|
|
102
109
|
});
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.mergeSvgAndPngIcons = void 0;
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const child_process_1 = require("child_process");
|
|
9
10
|
const mergeJsonObjects = (svgJsonObject, pngJsonObject) => {
|
|
10
11
|
const merged = {};
|
|
11
12
|
Object.entries(svgJsonObject).forEach(([key]) => { merged[key] = ''; });
|
|
@@ -35,9 +36,11 @@ const mergeSvgAndPngIcons = (c) => {
|
|
|
35
36
|
let pngJsonObject = {};
|
|
36
37
|
if (fs_1.default.existsSync(svgSpriteMapCSSPath)) {
|
|
37
38
|
svgSpriteCss = fs_1.default.readFileSync(svgSpriteMapCSSPath).toString();
|
|
39
|
+
(0, child_process_1.execSync)(`rm -rf ${svgSpriteMapCSSPath}`);
|
|
38
40
|
}
|
|
39
41
|
if (fs_1.default.existsSync(pngSpriteMapCSSPath)) {
|
|
40
42
|
pngSpriteCss = fs_1.default.readFileSync(pngSpriteMapCSSPath).toString();
|
|
43
|
+
(0, child_process_1.execSync)(`rm -rf ${pngSpriteMapCSSPath}`);
|
|
41
44
|
}
|
|
42
45
|
if (fs_1.default.existsSync(svgJsonPath)) {
|
|
43
46
|
svgJsonObject = JSON.parse(fs_1.default.readFileSync(svgJsonPath).toString());
|
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.1563+d3d8bdeb",
|
|
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": "d3d8bdeba13ca092db1199ca5af505f07d829e9e"
|
|
65
65
|
}
|