1.1.50 • Published 11 months ago

wok.js v1.1.50

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

wok.js

Minimalist component framework instead of Angular, React, Vue, Solid, Svelte, Lit

npm install -g wok.js installs the package globally

wokproj creates a wok.js project (Win11: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted)

wok somename creates a new wok

fry starts your wok.js application

how to use

In the _woks folder there are your custom reusable components.

In the _build folder the parsed code resides, you can deploy it as you would deploy a vanilla project.

image image

<script> is responsible for behaviour and state

and then invoke them using dot notation. image

// on elements inside the wok select('h1').on('click', () => { console.log('h1 was clicked!'); });

</details>
  
  
  
<details>
<summary>You can add your woks programically to the DOM</summary>

```js
const w = createElement('example-wok');   // or document.createElement('example-wok');
select('body').appendChild(w);            // or document.body.appendChild(w);

select('example-wok').remove();           // or w.remove();

select('example-wok').on('death', () => { console.log('wok died!'); });

</details>



<details>
<summary>Syntax (either can be used)</summary>

.on --> .addEventListener

.off --> .removeEventListener

select --> document.querySelector

selectAll --> document.querySelectorAll

createElement --> document.createElement

</details>  



### `<example-wok>` is responsible for structure

<details>
<summary>You can render reactive props using the interpolation syntax ${_nameOfmyProp}</summary>

```html
<example-wok>
    <lu>
        <li>${_x}</li>
        <li>${_y}</li>
        <li>${_x / _y}</li>
    </lu>
</example-wok>

todo

✔ rebuild the component on save, so we don't have to 'npm run fry' every time, we make a change

✔ rebuild when save happens in regural html files too (not only in woks)

✔ find a way to shorten the command which creates a new wok, beacuse 'npm run wok wokname' is too long

? find a way to achieve highlighting in the css part of the wok, and override linting errors

? find a way to run the app from memory, and only build it when we want to deploy it

? templating language

? >selectors> for wok inner elements

? attrs as parameters in createElement()

? live-server should send refresh msg to the websocket only once after code parsing

1.1.50

11 months ago

1.1.49

12 months ago

1.1.48

1 year ago

1.1.47

1 year ago

1.1.46

1 year ago

1.1.45

1 year ago

1.1.44

1 year ago

1.1.43

1 year ago

1.1.42

1 year ago

1.1.41

1 year ago

1.1.40

1 year ago

1.1.39

1 year ago

1.1.38

1 year ago

1.1.37

1 year ago

1.1.36

1 year ago

1.1.35

1 year ago

1.1.34

1 year ago

1.1.33

1 year ago

1.1.32

1 year ago

1.1.31

1 year ago

1.1.30

1 year ago

1.1.29

1 year ago

1.1.28

1 year ago

1.1.27

1 year ago

1.1.26

1 year ago

1.1.25

1 year ago

1.1.24

1 year ago

1.1.23

1 year ago

1.1.22

1 year ago

1.1.21

1 year ago

1.1.20

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago