@pushwoosh/frontend-builder-engine 1.0.3 → 1.0.5
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/lib/eslint.config.mjs +2 -0
- package/lib/pushwoosh-engine.js +9 -1
- package/package.json +1 -1
package/lib/eslint.config.mjs
CHANGED
|
@@ -37,6 +37,7 @@ export default tseslint.config(
|
|
|
37
37
|
},
|
|
38
38
|
rules: {
|
|
39
39
|
...hooksPlugin.configs.recommended.rules,
|
|
40
|
+
'react/display-name': 'off',
|
|
40
41
|
'react/no-array-index-key': 'error',
|
|
41
42
|
'@stylistic/multiline-ternary': 'off',
|
|
42
43
|
'@stylistic/ts/member-delimiter-style': [
|
|
@@ -58,6 +59,7 @@ export default tseslint.config(
|
|
|
58
59
|
fixStyle: 'inline-type-imports',
|
|
59
60
|
}],
|
|
60
61
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
62
|
+
'import/no-named-as-default': 'off',
|
|
61
63
|
'import/no-unresolved': 'off',
|
|
62
64
|
'import/order': [
|
|
63
65
|
'error',
|
package/lib/pushwoosh-engine.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
const childProcess = require('child_process');
|
|
2
2
|
const fs = require('fs').promises;
|
|
3
3
|
const { program, Command } = require('commander');
|
|
4
|
+
const path = require('path');
|
|
4
5
|
|
|
5
6
|
const { buildTs } = require('./build-ts');
|
|
6
7
|
const { buildStyledComponents } = require('./build-babel');
|
|
7
8
|
const { loadTsConfig } = require('./lib-build-tsconfig');
|
|
8
|
-
const { loadPushwooshConfig } = require('./helpers');
|
|
9
|
+
const { loadPushwooshConfig, listFilesInDirectoryRecursively } = require('./helpers');
|
|
9
10
|
|
|
10
11
|
program
|
|
11
12
|
.version('1.0.0')
|
|
@@ -22,6 +23,13 @@ program
|
|
|
22
23
|
});
|
|
23
24
|
await buildTs(curDir, tsConfig);
|
|
24
25
|
await buildStyledComponents(targetDir, targetDir);
|
|
26
|
+
const files = await listFilesInDirectoryRecursively(curDir).then((files) => files.filter((file) => file.endsWith('.svg')));
|
|
27
|
+
await Promise.all(files.map(async (file) => {
|
|
28
|
+
const sourcePath = `${curDir}/${file}`;
|
|
29
|
+
const targetPath = `${targetDir}/${file}`;
|
|
30
|
+
await fs.mkdir(path.dirname(targetPath), { recursive: true });
|
|
31
|
+
await fs.copyFile(sourcePath, targetPath);
|
|
32
|
+
}));
|
|
25
33
|
await fs.copyFile(`${curDir}/package.json`, `${targetDir}/package.json`);
|
|
26
34
|
await fs.copyFile(`${curDir}/.npmrc`, `${targetDir}/.npmrc`);
|
|
27
35
|
});
|