0.1.4 • Published 8 months ago

html-es v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

EsHTML (Work in Progress)

A transpiler that converts EsHTML (a variant of HTML with first-class support for Spanish tags and attributes) to standard HTML - designed for Spanish speakers to learn web development without the added barrier of English terminology.

⚠️ Note: This project is currently under active development. Features and documentation may change.

Description

EsHTML is an educational tool that allows writing HTML using Spanish keywords and attributes, making web development more accessible to Spanish speakers. The html-es package provides a transpiler that converts EsHTML code into standard HTML, enabling learners to focus on understanding core web concepts without the additional challenge of English terminology.

Installation

npm install html-es # Note: Package not yet published

Basic Usage

import { EsHTMLTranspiler } from 'html-es';

const transpiler = new EsHTMLTranspiler();

// Write HTML using Spanish keywords (EsHTML)
const eshtml = `
<artículo>
    <título>¡Hola Mundo!</título>
    <sección clase="contenido">
        <párrafo>Este es un ejemplo de EsHTML</párrafo>
        <botón deshabilitado>Enviar</botón>
    </sección>
</artículo>
`;

// Convert EsHTML to standard HTML
const html = transpiler.transpile(eshtml);

Generated HTML:

<article>
    <title>¡Hola Mundo!</title>
    <section class="content">
        <p>Este es un ejemplo de EsHTML</p>
        <button disabled>Enviar</button>
    </section>
</article>

Features

🚧 Development Status: The following features are planned or in development

  • Write HTML using Spanish keywords and attributes (EsHTML syntax)
  • Built-in validation of EsHTML syntax
  • Support for all standard HTML elements
  • Development mode with strict validation

Examples

Form Elements

<formulario método="post" acción="/enviar">
    <entrada tipo="texto" requerido nombre="usuario">
    <botón tipo="enviar">Enviar</botón>
</formulario>

Headings

<e1>Título Principal</e1>
<e2>Subtítulo</e2>
<e3>Sección</e3>

Tables

<tabla>
    <ft>
        <et>Encabezado</et>
    </ft>
    <ct>Dato</ct>
</tabla>

API

EsHTMLTranspiler

const transpiler = new EsHTMLTranspiler();
transpiler.transpile(source: string, options?: TranspileOptions): string;

Options

interface TranspileOptions {
    strictMode?: boolean;      // Throws errors on invalid syntax
    ignoreWarnings?: boolean;  // Ignores non-critical validation warnings
}

License

MIT

Author

Logan Jorgensen

Links

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago