Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/GuiDevloper/nullstack-polyable
:earth_americas: Making Nullstack framework able to read any template vocable you type
https://github.com/GuiDevloper/nullstack-polyable
element nullstack plugin
Last synced: 3 months ago
JSON representation
:earth_americas: Making Nullstack framework able to read any template vocable you type
- Host: GitHub
- URL: https://github.com/GuiDevloper/nullstack-polyable
- Owner: GuiDevloper
- License: mit
- Created: 2021-03-26T19:35:57.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-21T05:49:55.000Z (over 1 year ago)
- Last Synced: 2024-11-10T15:12:14.318Z (3 months ago)
- Topics: element, nullstack, plugin
- Language: JavaScript
- Homepage:
- Size: 50.8 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nullstack - nullstack-polyable - Making Nullstack framework able to read any template vocable you type (Components & Libraries / Node/Element Plugins)
README
# Nullstack Polyable
Making Nullstack framework able to read any template vocable you type
## Installation
Run this command on your Nullstack project:
```sh
npm install nullstack-polyable -D
```or, using Yarn:
```sh
yarn add nullstack-polyable -D
```Then import it in your **client.js**/**server.js** files (as shown here in [**tests/index.js**](./tests/client.js)):
> Showing usage changing element types and attributes to pt-BR
```js
import polyable from 'nullstack-polyable';Nullstack.use(polyable({
types: {
button: 'botão',
input: 'entrada'
},
attributes: {
onclick: 'aoclicar',
oninput: 'aoteclar'
}
}));
```## Examples
> Everything can be seen being used on tests folder
After the configuration, the use become this:
```jsx
exibe({ ação }) {
// it will show the attribute from the element
console.log(ação);
}renderiza() {
const { exibe } = this;
return (
<>
Clique aqui
>
)
}// just to see where it goes,
// using pt-BR in lifecycle hooks and the render function
prepare = this.prepara;
console = this.exibe;
render = this.renderiza;
```