generator-reshow 0.15.3 → 0.16.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.
@@ -13,9 +13,7 @@ const usePage = (props) => {
13
13
  activeMenu: pageName,
14
14
  },
15
15
  });
16
- if (tplProps) {
17
- dispatch({ tplProps });
18
- }
16
+ dispatch({ tplProps, pageName });
19
17
  });
20
18
  ajaxDispatch("ajaxGet", {
21
19
  url: "/data/env",
@@ -13,10 +13,10 @@ const themes = {
13
13
  };
14
14
 
15
15
  const Index = (props) => (
16
- <Return initStates={["tplProps"]}>
17
- {({ tplProps }) => {
16
+ <Return initStates={["tplProps", "pageName"]}>
17
+ {({ tplProps, pageName }) => {
18
18
  return (
19
- <Doc {...tplProps}>
19
+ <Doc {...tplProps} className={pageName}>
20
20
  <ClientRoute {...props} themes={themes} defaultThemePath="Page1" />
21
21
  <PageLoadProgressHandler ajax={true} />
22
22
  <ReshowMessage />
@@ -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;