wallace 0.7.0 → 0.7.2
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/README.md +2 -2
- package/lib/component.js +1 -1
- package/lib/types.d.ts +4 -1
- package/package.json +2 -2
- /package/lib/{router.jsx → router.js} +0 -0
package/README.md
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
This package contains the library for the [Wallace](https://github.com/wallace-js/wallace) framework, which you import into your source files:
|
|
4
4
|
|
|
5
5
|
```jsx
|
|
6
|
-
import { mount } from
|
|
6
|
+
import { mount } from 'wallace';
|
|
7
7
|
|
|
8
8
|
const MyComponent = () => <div>Hello world</div>;
|
|
9
9
|
|
|
10
|
-
mount(
|
|
10
|
+
mount('main', Component);
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
It requires the [babel-plugin-wallace](https://www.npmjs.com/package/babel-plugin-wallace) to work, which is a dependency of this package, always at the same version.
|
package/lib/component.js
CHANGED
|
@@ -156,7 +156,7 @@ export function createConstructor(baseComponent) {
|
|
|
156
156
|
component.render(props, ctrl);
|
|
157
157
|
return component;
|
|
158
158
|
};
|
|
159
|
-
Component.stubs = {}
|
|
159
|
+
Component.stubs = Object.assign({}, baseComponent.stubs);
|
|
160
160
|
return Component;
|
|
161
161
|
}
|
|
162
162
|
|
package/lib/types.d.ts
CHANGED
|
@@ -526,7 +526,10 @@ declare module "wallace" {
|
|
|
526
526
|
ThisType<ComponentInstance<Props, Controller, Methods>>;
|
|
527
527
|
// Methods will not be available on nested component, so omit.
|
|
528
528
|
readonly stubs?: Record<string, ComponentFunction<Props, Controller>>;
|
|
529
|
-
create?(
|
|
529
|
+
create?(
|
|
530
|
+
props?: Props,
|
|
531
|
+
ctrl?: Controller
|
|
532
|
+
): ComponentInstance<Props, Controller, Methods>;
|
|
530
533
|
}
|
|
531
534
|
|
|
532
535
|
type ComponenMethods<Props, Controller> = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wallace",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"author": "Andrew Buchan",
|
|
5
5
|
"description": "The framework that brings you FREEDOM!!",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"babel-plugin-wallace": "^0.7.0",
|
|
18
18
|
"browserify": "^17.0.1"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "8ddf878a5e0119acc5edea32f08b7fc8a40974f1"
|
|
21
21
|
}
|
|
File without changes
|