generator-reshow 0.17.0 → 0.17.3

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.
@@ -10,18 +10,10 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "get-object-value": "*",
14
- "organism-react-ajax": "*",
15
- "organism-react-navigation": "*",
16
- "organism-react-popup": "*",
17
- "organism-react-progress": "*",
18
13
  "pmvc_react_admin": "*",
19
- "react": "^16.x",
20
- "react-dom": "^16.x",
21
- "reshow": "*",
14
+ "react": "^18.x",
15
+ "react-dom": "^18.x",
22
16
  "reshow-app": "*",
23
- "reshow-constant": "*",
24
- "reshow-url": "*",
25
17
  "ricon": "*"
26
18
  },
27
19
  "scripts": {
@@ -3,7 +3,8 @@ version: 2.1
3
3
  executors:
4
4
  docker-publisher:
5
5
  docker:
6
- - image: circleci/buildpack-deps:18.04
6
+ # https://github.com/CircleCI-Public/cimg-base
7
+ - image: cimg/base:current
7
8
 
8
9
  jobs:
9
10
  build-and-publish:
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "devDependencies": {
14
14
  "@babel/cli": "^7.x",
15
- "reshow-unit": "*"
15
+ "reshow-unit-dom": "*"
16
16
  },
17
17
  "main": "./build/cjs/src/index.js",
18
18
  "module": "./build/es/src/index.js",
@@ -1,4 +1,5 @@
1
1
  const { YoGenerator, YoHelper, commonPrompt } = require("yo-reshow");
2
+ const { KEYS } = require("reshow-constant");
2
3
 
3
4
  /**
4
5
  * update-esm-export Generator
@@ -32,18 +33,39 @@ module.exports = class extends YoGenerator {
32
33
  if (!opts.exports) {
33
34
  return;
34
35
  }
35
- const { srcArr, appendArr, prependArr, moreKeyArr, moreValArr, pkgjson } =
36
- opts.exports;
36
+ const {
37
+ srcArr,
38
+ prependArr,
39
+ moreKeyArr,
40
+ moreValArr,
41
+ pkgjson,
42
+ appendArr,
43
+ requirePrependArr,
44
+ requireAppendArr,
45
+ importPrependArr,
46
+ importAppendArr,
47
+ } = opts.exports;
37
48
  const nextExports = {};
38
49
  srcArr.forEach((v, index) => {
39
50
  const prepend = prependArr[index];
40
- const append = appendArr[index];
41
51
  glob(
42
52
  v,
43
53
  ({ filename }) => {
44
- nextExports[
45
- `${prepend}${filename}`
46
- ] = `${prepend}${filename}${append}`;
54
+ let content;
55
+ if (appendArr) {
56
+ const append = appendArr[index];
57
+ content = `${prepend}${filename}${append}`;
58
+ } else {
59
+ content = {
60
+ require: `${requirePrependArr[index]}${filename}${requireAppendArr[index]}`,
61
+ import: `${importPrependArr[index]}${filename}${importAppendArr[index]}`,
62
+ };
63
+ }
64
+ let nextKey = `${prepend}${filename}`;
65
+ if (nextKey === "./index") {
66
+ nextKey = ".";
67
+ }
68
+ nextExports[nextKey] = content;
47
69
  },
48
70
  true
49
71
  );
@@ -58,7 +80,9 @@ module.exports = class extends YoGenerator {
58
80
  if (this.options.n) {
59
81
  const diff = {};
60
82
  KEYS(exports).forEach((key) => {
61
- if (exports[key] !== nextExports[key]) {
83
+ if (
84
+ JSON.stringify(exports[key]) !== JSON.stringify(nextExports[key])
85
+ ) {
62
86
  diff[key] = {
63
87
  prev: exports[key],
64
88
  next: nextExports[key],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-reshow",
3
- "version": "0.17.0",
3
+ "version": "0.17.3",
4
4
  "description": "Yeoman generator for reshow. (app, generator, ...etc)",
5
5
  "author": "Hill <hill@kimo.com>",
6
6
  "repository": {