# smalldom

> Build XML/HTML based files dynamicaly with .sdom transpiler !

Latest version **1.0.8** (published 2022-10-25) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install smalldom
pnpm add smalldom
yarn add smalldom
bun add smalldom
```

Provides the command `sdom`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2022-10-25 |
| First published | 2022-10-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 93.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Enzo Aicardi |
| Maintainers | enzoaicardi |
| Keywords | html, xml, dom, sdom, smalldom |

## Links

- npm: https://www.npmjs.com/package/smalldom
- Repository: https://github.com/enzoaicardi/smalldom-v1
- Homepage: https://sdom.aicardi.pro
- Issues: https://github.com/enzoaicardi/smalldom-v1/issues
- npm.io page: https://npm.io/package/smalldom

## Dependencies (1)

- [yargs](https://npm.io/package/yargs.md) ^17.6.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.8 (latest) — 2022-10-25
- 1.0.7 — 2022-10-22
- 1.0.6 — 2022-10-22
- 1.0.5 — 2022-10-22
- 1.0.4 — 2022-10-21
- 1.0.3 — 2022-10-21
- 1.0.2 — 2022-10-21
- 1.0.1 — 2022-10-20

## README

# smalldom / sdom

## What it is

sdom or "small dom" is a dynamic markup language for creating files based on XML or HTML.

## How does it works

### step n°1

First you create a .sdom file in which you write your markup as shown below.
For the exemple we gonna use the HTML document pattern.

```
html

    head {
        meta [charset="UTF-8"]
    }

    body {

        // Content here...

    }
```

### step n°2

In a second time you just need to run the following command to compile your code.

`sdom compile [folder|source.sdom] [folder|output.html] [--extension|--ext] [--layout|--ly] [--watch]`

Arguments :
- `[source.sdom]` the path to your source file (index.sdom by default) or folder
- `[output.html]` the path to your output file (dist/index.html by default) or folder
- `[--extension]` the extension of output files in case of output folder (html by default)
- `[--layout]` the layout render of your html, you can custom it by using `[numberBreaks/numberSpaces]` notation (minified by default)
- `[--watch]` the option to recompile everytime your .sdom file change
- `[--help]` for help informations

### step n°3

Open your HTML file and you will see...

```
<html>

    <head>
        <meta charset="UTF-8">
    </head>

    <body>

        // Content here...

    </body>

</html>
```

### step n°4

Read the documentation to see all possibilities with sdom.
[https://sdom.aicardi.pro/doc](https://sdom.aicardi.pro/doc)

## Why should i use it ?

No particular reason :)

---
_Source: https://npm.io/package/smalldom · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
