@taishods/core 0.15.0 → 0.15.1
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.en.md +23 -13
- package/README.md +23 -14
- package/cli.js +209 -206
- package/core.js +1 -1
- package/css/taisho.full.css +1 -1
- package/generate.js +3 -3
- package/package.json +1 -1
- package/types/generate/errores-config.d.ts +3 -0
- package/types/generate/vocabulary.d.ts +5 -0
- package/types/generate-cli/core-js.d.ts +10 -0
- package/types/generate-cli/generate.d.ts +4 -0
- package/types/generate-cli/idioma.d.ts +2 -0
- package/types/generate-cli/init.d.ts +6 -0
- package/types/generate-cli/mensajes.d.ts +2 -0
- package/types/generate-cli/motor.d.ts +1 -1
- package/types/generate-cli/vite.d.ts +1 -1
- package/vite.js +180 -180
package/README.en.md
CHANGED
|
@@ -14,9 +14,9 @@ There are two ways to add it to your project. It's the same Core either way, and
|
|
|
14
14
|
It's the shortest path, with nothing to install. The version is pinned in the URL:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<link rel="stylesheet" href="https://taisho.design/core/0.15.
|
|
18
|
-
<link rel="stylesheet" href="https://taisho.design/core/0.15.
|
|
19
|
-
<script type="module" src="https://taisho.design/core/0.15.
|
|
17
|
+
<link rel="stylesheet" href="https://taisho.design/core/0.15.1/taisho.tokens.css" integrity="sha384-+2WHAtu42BCWEq7KajKLeexi0n+E4UXhDgH4f5iQLZWhC0WJf3DNRH2uBr4FrdIV" crossorigin="anonymous">
|
|
18
|
+
<link rel="stylesheet" href="https://taisho.design/core/0.15.1/taisho.full.css" integrity="sha384-ZKmW+Qt250kHVvsit6RM7serrbDXvLttvBIKzHlrhKnFV7Bal6NSFc0Ld16k/m0l" crossorigin="anonymous">
|
|
19
|
+
<script type="module" src="https://taisho.design/core/0.15.1/taisho.core.js" integrity="sha384-AEROM85MrEJoTq8ilp/I9le3EX6EntjfccTSSC3IVEbsaAE9s19OTFb6us6oEuKP" crossorigin="anonymous"></script>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Order matters. The theme goes first, because it defines the variables; then the system CSS, which reads them; and
|
|
@@ -30,20 +30,30 @@ command from your project root (Node 22.18 or later):
|
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
npm i -D @taishods/core
|
|
33
|
-
npx taisho init # asks for the language, brand, theme name, fonts,
|
|
34
|
-
npx taisho generate # compiles your CSS to
|
|
33
|
+
npx taisho init # asks for the language, brand, theme name, fonts, your own icons, and the output folder, and writes taisho.config.ts
|
|
34
|
+
npx taisho generate # compiles your CSS and copies the behavior JS to that folder
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
`
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
`node_modules`, in this order:
|
|
37
|
+
The output folder is the one that ships with your site (for example `public/taisho`, `static/taisho`, or
|
|
38
|
+
`./taisho`); `init` suggests one based on your project layout and saves it in `taisho.config.ts`. When it's
|
|
39
|
+
done, `generate` prints the exact `<link>` and `<script>` lines to paste into your HTML. Both the CSS and the
|
|
40
|
+
behavior JS end up in that folder, side by side:
|
|
42
41
|
|
|
43
42
|
```html
|
|
44
|
-
<link rel="stylesheet" href="
|
|
45
|
-
<link rel="stylesheet" href="
|
|
46
|
-
<script type="module" src="
|
|
43
|
+
<link rel="stylesheet" href="taisho/theme.css">
|
|
44
|
+
<link rel="stylesheet" href="taisho/taisho.css">
|
|
45
|
+
<script type="module" src="taisho/taisho.core.js"></script>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### With a bundler (Vite and similar)
|
|
49
|
+
|
|
50
|
+
If the project already uses a bundler, the CSS and the JS are imported by name from the package, with no
|
|
51
|
+
files to copy or link:
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
import '@taishods/core/css/tokens/taisho.css'; // the system theme
|
|
55
|
+
import '@taishods/core/css/taisho.full.css'; // the full CSS
|
|
56
|
+
import '@taishods/core/core'; // the behavior
|
|
47
57
|
```
|
|
48
58
|
|
|
49
59
|
## What's included
|
package/README.md
CHANGED
|
@@ -14,9 +14,9 @@ Hay dos formas de tenerlo en tu proyecto. Son el mismo Core y se puede pasar de
|
|
|
14
14
|
Es la más corta, no instala nada. La versión va fija en la URL:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<link rel="stylesheet" href="https://taisho.design/core/0.15.
|
|
18
|
-
<link rel="stylesheet" href="https://taisho.design/core/0.15.
|
|
19
|
-
<script type="module" src="https://taisho.design/core/0.15.
|
|
17
|
+
<link rel="stylesheet" href="https://taisho.design/core/0.15.1/taisho.tokens.css" integrity="sha384-+2WHAtu42BCWEq7KajKLeexi0n+E4UXhDgH4f5iQLZWhC0WJf3DNRH2uBr4FrdIV" crossorigin="anonymous">
|
|
18
|
+
<link rel="stylesheet" href="https://taisho.design/core/0.15.1/taisho.full.css" integrity="sha384-ZKmW+Qt250kHVvsit6RM7serrbDXvLttvBIKzHlrhKnFV7Bal6NSFc0Ld16k/m0l" crossorigin="anonymous">
|
|
19
|
+
<script type="module" src="https://taisho.design/core/0.15.1/taisho.core.js" integrity="sha384-AEROM85MrEJoTq8ilp/I9le3EX6EntjfccTSSC3IVEbsaAE9s19OTFb6us6oEuKP" crossorigin="anonymous"></script>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
El orden importa: primero el tema, que define las variables; después el CSS del sistema, que las
|
|
@@ -30,21 +30,30 @@ se corre el comando `taisho` desde la raíz de tu proyecto (Node 22.18 o más nu
|
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
npm i -D @taishods/core
|
|
33
|
-
npx taisho init # pregunta idioma, marca, nombre del tema, fuentes e íconos propios, y escribe taisho.config.ts
|
|
34
|
-
npx taisho generate # compila tu CSS a
|
|
33
|
+
npx taisho init # pregunta idioma, marca, nombre del tema, fuentes e íconos propios y la carpeta de salida, y escribe taisho.config.ts
|
|
34
|
+
npx taisho generate # compila tu CSS y copia el JS de comportamiento a esa carpeta
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
`<script
|
|
40
|
-
|
|
41
|
-
Para no generar nada, el tema del sistema y el CSS completo también se pueden enlazar directo
|
|
42
|
-
desde `node_modules`, en este orden:
|
|
37
|
+
La carpeta de salida es la que se despliega con el sitio (por ejemplo `public/taisho`, `static/taisho` o
|
|
38
|
+
`./taisho`); `init` propone una según la estructura del proyecto y la guarda en `taisho.config.ts`. Al
|
|
39
|
+
terminar, `generate` imprime las líneas `<link>` y `<script>` exactas para pegar en el HTML. Tanto el CSS
|
|
40
|
+
como el JS de comportamiento quedan en esa carpeta, juntos:
|
|
43
41
|
|
|
44
42
|
```html
|
|
45
|
-
<link rel="stylesheet" href="
|
|
46
|
-
<link rel="stylesheet" href="
|
|
47
|
-
<script type="module" src="
|
|
43
|
+
<link rel="stylesheet" href="taisho/theme.css">
|
|
44
|
+
<link rel="stylesheet" href="taisho/taisho.css">
|
|
45
|
+
<script type="module" src="taisho/taisho.core.js"></script>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Con un empaquetador (Vite y similares)
|
|
49
|
+
|
|
50
|
+
Si el proyecto ya usa un empaquetador, el CSS y el JS se importan por nombre desde el paquete, sin copiar
|
|
51
|
+
ni enlazar archivos:
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
import '@taishods/core/css/tokens/taisho.css'; // el tema del sistema
|
|
55
|
+
import '@taishods/core/css/taisho.full.css'; // el CSS completo
|
|
56
|
+
import '@taishods/core/core'; // el comportamiento
|
|
48
57
|
```
|
|
49
58
|
|
|
50
59
|
## Qué trae
|