generator-reshow 0.0.3 → 0.15.0

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.
@@ -4,7 +4,7 @@ import Menu from "../molecules/Menu";
4
4
 
5
5
  const DocTemplate = getDocTemplate({
6
6
  sideWidth: 160,
7
- active: true
7
+ active: true,
8
8
  });
9
9
 
10
10
  const Doc = ({ children, ...props }) => (
@@ -72,12 +72,13 @@ module.exports = class extends YoGenerator {
72
72
  cp("package.json", null, this.payload);
73
73
  cp("src", null, this.payload);
74
74
  cp("Test.js", "src/__tests__/Test.js", this.payload);
75
+ cp("yarn.lock");
75
76
  }
76
77
 
77
78
  end() {
78
79
  if (!this.options?.skipInstall) {
79
- const { say } = YoHelper(this);
80
- say('Next you could try "npm run build" or "npm run test"');
80
+ const { say, onExit } = YoHelper(this);
81
+ onExit(()=>say('Next you could try "npm run build" or "npm run test"'));
81
82
  }
82
83
  }
83
84
  };
@@ -0,0 +1,10 @@
1
+ import { expect } from "chai";
2
+
3
+ import YourFunc from "../index";
4
+
5
+ describe("Test <%= mainName %>", () => {
6
+ it("basic testt", () => {
7
+ /*your test code*/
8
+ YourFunc();
9
+ });
10
+ });
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+
3
+ npm run build
@@ -0,0 +1,3 @@
1
+ const YourFunc = (props) => {};
2
+
3
+ export default YourFunc;