@easyv/react-component-builder 0.19.2 → 0.19.4

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/launcher/build.js CHANGED
@@ -7,6 +7,7 @@ const { appComponents, appBuild } = require('../config/paths');
7
7
  const { checkComponentFiles } = require('../utils');
8
8
  const getWebpackConfig = require('../config/webpack.config.build');
9
9
  const { getBuildEntrys } = require('./start');
10
+ const os = require('os');
10
11
 
11
12
  function canReadAsset(asset) {
12
13
  return (
@@ -25,9 +26,10 @@ module.exports = (name, option = {}) => {
25
26
  const result = await getBuildEntrys();
26
27
  const componentInfo = result.find((d) => d.name === name);
27
28
  const { base } = componentInfo;
29
+ const pathSymbol = os.type() === 'Windows_NT' ? "\\" : "/"
28
30
  const sourcePath = componentInfo.path.slice(
29
31
  0,
30
- componentInfo.path.lastIndexOf('/'),
32
+ componentInfo.path.lastIndexOf(pathSymbol),
31
33
  );
32
34
  // const sourcePath = path.join(appComponents, name);
33
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/react-component-builder",
3
- "version": "0.19.2",
3
+ "version": "0.19.4",
4
4
  "files": [
5
5
  "launcher",
6
6
  "templates",
@@ -20,7 +20,7 @@
20
20
  "@babel/core": "7.9.0",
21
21
  "@babel/register": "^7.10.4",
22
22
  "@easyv/react-gui": "1.6.6",
23
- "@easyv/simulator": "0.5.1",
23
+ "@easyv/simulator": "0.5.2",
24
24
  "@svgr/webpack": "4.3.3",
25
25
  "acorn": "^7.3.1",
26
26
  "acorn-jsx": "^5.2.0",