Skip to content

Commit 601e043

Browse files
committed
Initial commit: Emmet CLI
- Full-featured Emmet abbreviation expansion for command line - Support for 15+ languages (HTML, CSS, JSX, Vue, SCSS, etc.) - Custom snippets via .emmet/snippets.json - Syntax profiles via .emmet/syntaxProfiles.json - Advanced preferences via .emmet/config.json - Filters support (BEM, comment, trim) - Standard I/O for piping - Complete VSCode Emmet compatibility
0 parents  commit 601e043

30 files changed

+2910
-0
lines changed

.emmet/config.example.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "https://json-schema.org/draft-07/schema",
3+
"title": "Emmet CLI Advanced Configuration",
4+
"description": "Advanced preferences and variables for Emmet CLI (.emmet/config.json)",
5+
6+
"variables": {
7+
"lang": "en",
8+
"charset": "UTF-8",
9+
"author": "Your Name",
10+
"company": "Your Company"
11+
},
12+
13+
"preferences": {
14+
"css.color.short": true,
15+
"css.intUnit": "px",
16+
"css.floatUnit": "em",
17+
"css.unitAliases": "e:em, p:%, x:ex",
18+
"css.fuzzySearchMinScore": 0.3,
19+
"css.valueSeparator": ": ",
20+
"css.propertyEnd": ";",
21+
"scss.valueSeparator": ": ",
22+
"scss.propertyEnd": ";",
23+
"less.valueSeparator": ": ",
24+
"less.propertyEnd": ";",
25+
"sass.valueSeparator": ": ",
26+
"sass.propertyEnd": "",
27+
"stylus.valueSeparator": " ",
28+
"stylus.propertyEnd": "",
29+
"format.noIndentTags": "html",
30+
"format.forceIndentationForTags": "body",
31+
"output.inlineBreak": 3,
32+
"output.reverseAttributes": false,
33+
"output.selfClosingStyle": "html",
34+
"profile.allowCompactBoolean": false,
35+
"filter.commentTrigger": ["#", "."],
36+
"filter.commentBefore": "<!-- ",
37+
"filter.commentAfter": " -->",
38+
"bem.elementSeparator": "__",
39+
"bem.modifierSeparator": "_"
40+
}
41+
}

.emmet/snippets.example.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"title": "Emmet CLI Snippets Configuration",
3+
"description": "Custom snippets and variables per syntax (.emmet/snippets.json)",
4+
5+
"variables": {
6+
"lang": "en",
7+
"charset": "UTF-8"
8+
},
9+
10+
"html": {
11+
"snippets": {
12+
"hero": "section.hero>div.container>h1.hero-title{Hero Title}+p.hero-description{Hero Description}",
13+
"card": "div.card>img.card-img[src alt]+div.card-body>h5.card-title{Title}+p.card-text{Description}",
14+
"nav": "nav.navbar>div.container>ul.nav>li.nav-item*3>a.nav-link[href='#']{Link}",
15+
"form": "form.form>div.form-group*3>label.form-label+input.form-control:text"
16+
}
17+
},
18+
19+
"css": {
20+
"snippets": {
21+
"flex-center": "display: flex; align-items: center; justify-content: center;",
22+
"flex-between": "display: flex; align-items: center; justify-content: space-between;",
23+
"abs-center": "position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);",
24+
"grid-3": "display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;"
25+
}
26+
},
27+
28+
"jsx": {
29+
"snippets": {
30+
"rfc": "import React from 'react';\n\nconst Component = () => {\n return <div></div>;\n};\n\nexport default Component;"
31+
}
32+
}
33+
}

.emmet/syntaxProfiles.example.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"title": "Emmet CLI Syntax Profiles Configuration",
3+
"description": "Output formatting per syntax (.emmet/syntaxProfiles.json)",
4+
5+
"html": {
6+
"tag_case": "lower",
7+
"attr_case": "lower",
8+
"attr_quotes": "double",
9+
"self_closing_tag": "html"
10+
},
11+
12+
"xhtml": {
13+
"tag_case": "lower",
14+
"attr_quotes": "double",
15+
"self_closing_tag": "xhtml"
16+
},
17+
18+
"xml": {
19+
"tag_case": "upper",
20+
"attr_quotes": "single",
21+
"self_closing_tag": "xml"
22+
},
23+
24+
"jsx": {
25+
"tag_case": "lower",
26+
"attr_quotes": "double",
27+
"self_closing_tag": "xhtml"
28+
}
29+
}

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Dependencies
2+
node_modules/
3+
package-lock.json
4+
5+
# Build output
6+
lib/
7+
*.js.map
8+
9+
# Debug files
10+
debug-*.js
11+
test-*.js
12+
test-*.json
13+
*.log
14+
15+
# IDE
16+
.vscode/
17+
.idea/
18+
*.swp
19+
*.swo
20+
*~
21+
22+
# OS
23+
.DS_Store
24+
Thumbs.db
25+
26+
# Test coverage
27+
coverage/
28+
.nyc_output/
29+
30+
# Temporary files
31+
tmp/
32+
temp/
33+
*.tmp

0 commit comments

Comments
 (0)