Skip to content

Commit 39fe585

Browse files
committed
Actualizar compilador y documentacion a 0.0.42
1 parent 7c777f0 commit 39fe585

23 files changed

+90
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"dependencies": {
1010
"dompurify": "^2.0.11",
11-
"kscript": "0.0.37",
11+
"kscript": "0.0.42",
1212
"marked": "^1.1.0",
1313
"pug": "^2.0.3",
1414
"pug-plain-loader": "^1.0.0",

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/textos/es/docs/indice.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
versiones:
22
- next
3-
- v0.0.36
3+
- v0.0.42

public/textos/es/docs/next/modulos/import.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,28 @@ from "vue" import Vue
1111
1212
from "vue-router" import * as VueRouter
1313
14-
from "react" import React, { Component }
14+
from "react" import React, {Component}
1515
16-
from "./foo.js" import { foo }
16+
from "./foo.js" import {foo}
1717
18-
from "../scripts/bar.ks" import { bar as baz }
18+
from "../scripts/bar.ks" import {baz bar}
1919
2020
import "./Button.css"
2121
2222
```
2323

24-
## Discusión
24+
## Importar con otro nombre (as)
25+
26+
KScript invierte el orden. Primero se coloca el nuevo nombre, luego el nombre anterior.
27+
28+
Por ejemplo, si queremos importar `useEffect` y darle el nombre `effect` se escribe:
29+
30+
```
31+
from "react" import {effect useEffect}
32+
```
2533

34+
Primero se coloca el nuevo nombre (`effect`) y luego el nombre anterior (`useEffect`)
35+
36+
## Discusión
2637

2738
Se coloca `from` al inicio para que los IDEs puedan autocompletar correctamente. Eso es todo.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)