Releases: wpdas/alem
v1.3.1
v1.3.0
News
1 - Compile a stateless component as stateful. This will not add states to the component. When using this method, the component is generated as a Widget. This setting can also be useful to force the file to be created separately if you configure the project to create separate files for stateful components.
To force transform a stateless component into a stateful one, simply add the following signature "as stateful";
at the top, for example:
"as stateful";
const Spinner = () => (
<div className="spinner-border" role="status">
<span className="visually-hidden">Loading...</span>
</div>
);
export default Spinner;
2 - Configuration to eject stateful components. This causes each stateful component to be generated in a separate file. Use the alem.config.json
file to set the following configuration:
options: {
ejectStatefulComponents: true
}
v1.2.1
v1.2.0
v1.1.3
v1.1.2
- Fixed issue where new deeper files were not being injected to the file schemas, causing errors during the compilation;
- Fixed issue where widget props was not being executed as string. See here:
transformSchemaToWidget
⇾transformWidgetInChildProps
- version updated: 1.1.2
v1.1.1
v1.1.0
- logs message updated
- added feature to re-build only the changed files when there's a new change
New modules:
getFileExports
: get exported items from file;loadCachedFilesInfo
: used to load previous files info and change the ones affected by the file change.
v1.0.1
Esse módulo é usado para processar componentes stateful dentro de arrow functions nas propriedades de outros componentes que devem se tornar Widgets no bundle final. Exemplo:
Isso:
<Foo renderItem={project => <A_192 projectId={project.registrant_id} />} />
Vai se tornar isso:
<Foo renderItem: (project) => <><Widget loading=" " code={props.alem.componentsCode.A_192} props={{ ...{ projectId: project.registrant_id, ...props } }} /></>