generator-reshow 0.17.30 → 0.17.33

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.
@@ -53,7 +53,7 @@ module.exports = class extends YoGenerator {
53
53
 
54
54
  writing() {
55
55
  this.env.options.nodePackageManager = "yarn";
56
- const { cp, chMainName, updateJSON } = YoHelper(this);
56
+ const { cp, chMainName, syncJSON } = YoHelper(this);
57
57
 
58
58
  // handle change to new folder
59
59
  chMainName(this.mainName);
@@ -61,10 +61,10 @@ module.exports = class extends YoGenerator {
61
61
  // handle copy file
62
62
  cp("src", null, this.payload);
63
63
  cp("README.md", null, this.payload);
64
+ cp(".gitignore", null, this.payload);
64
65
  cp("Test.js", "src/__tests__/Test.js", this.payload);
65
- // cp("yarn.lock");
66
66
 
67
- updateJSON("package.json", null, this.payload, (data) => {
67
+ syncJSON("package.json", null, this.payload, (data) => {
68
68
  const keywords = this.payload.keyword?.split(",");
69
69
  if (keywords && keywords.length) {
70
70
  data.keywords = keywords.map((s) => s.trim());
@@ -77,6 +77,7 @@ module.exports = class extends YoGenerator {
77
77
  };
78
78
  if (!this.payload.isUseBabel) {
79
79
  delete data.devDependencies["@babel/cli"];
80
+ delete data.exports;
80
81
  delete data.module;
81
82
  delete data.scripts.clean;
82
83
  delete data.scripts.build;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.17.30",
2
+ "version": "0.17.33",
3
3
  "name": "generator-reshow",
4
4
  "repository": {
5
5
  "type": "git",