emmet-cli is a command line tool to expand Emmet expression.
$ emmet-cli --help
Usage: emmet-cli <expr>
Version: v0.0.1
Description:
A simple command to expand Emmet expression
Options:
-h, --help - Show this help.
-V, --version - Show the version number for this program.
-s, --stylesheet - Stylesheet mode
To expand the expression, just specify the expression in first argument.
$ emmet-cli "!>ul#nav>li.item$*4>a{Item $}"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<ul id="nav">
<li class="item1"><a href="">Item 1</a></li>
<li class="item2"><a href="">Item 2</a></li>
<li class="item3"><a href="">Item 3</a></li>
<li class="item4"><a href="">Item 4</a></li>
</ul>
</body>
</html>
NOTE: In zsh, the !
symbol will be expanded, so write \!
instead.
To output as a stylesheet instead of a markup document, run with the -s
,
--stylesheet
option.
$ emmet-cli -s "bd1-s#f.5"
border: 1px solid rgba(255, 255, 255, 0.5);
Requires Deno >= v1.25, testing on v1.33.3.
deno install --name emmet-cli --force https://raw.githubusercontent.com/sheepla/emmet-cli/master/cli.ts
- Make it possible to specify indentation etc. with command line options
- Add a user snippet from a config file and make it configureable
- Distribute pre-compiled binaries from GitHub release page
MIT
Welcome any contributing such as adding features, typo fixing, etc.