@@ -13,10 +13,27 @@ A powerful command-line interface for Emmet abbreviation expansion, powered by t
1313## Installation
1414
1515``` bash
16+ # Install globally
17+ npm install -g @saifulapm/emmet-cli
18+
19+ # Or install locally in your project
20+ npm install --save-dev @saifulapm/emmet-cli
21+ ```
22+
23+ ### Development Setup
24+
25+ ``` bash
26+ # Clone the repository
27+ git clone https://github.com/saifulapm/emmet-cli.git
28+ cd emmet-cli
29+
30+ # Install dependencies
1631npm install
32+
33+ # Build
1734npm run build
1835
19- # Link globally (optional)
36+ # Link globally for testing
2037npm link
2138```
2239
@@ -246,10 +263,7 @@ Advanced preferences and variables:
246263 "css.floatUnit" : " rem" ,
247264 "bem.elementSeparator" : " __" ,
248265 "bem.modifierSeparator" : " --" ,
249- "profile.allowCompactBoolean" : true ,
250- "filter.commentTrigger" : [" #" , " ." ],
251- "filter.commentBefore" : " <!-- " ,
252- "filter.commentAfter" : " -->"
266+ "profile.allowCompactBoolean" : true
253267 }
254268}
255269```
@@ -275,9 +289,8 @@ Advanced preferences and variables:
275289- ` profile.allowCompactBoolean ` - ` <input disabled> ` vs ` <input disabled="disabled"> `
276290
277291** Comment Filter:**
278- - ` filter.commentTrigger ` - Elements that trigger comments (default: [ "#", "."] )
279- - ` filter.commentBefore ` - Comment prefix (default: "<!-- ")
280- - ` filter.commentAfter ` - Comment suffix (default: " -->")
292+ - Note: Comment filter settings use special defaults from vscode-emmet-helper
293+ - Only override ` filter.commentTrigger ` , ` filter.commentBefore ` , ` filter.commentAfter ` if you need custom comment templates
281294
282295** BEM:**
283296- ` bem.elementSeparator ` - Element separator (default: "__ ")
@@ -394,19 +407,33 @@ DEBUG_EMMET=1 emmet expand "div.test" --syntax html
394407## API Usage
395408
396409``` typescript
397- import { expand , wrap , extract , validate } from ' @vscode /emmet-cli' ;
410+ import { expandCommand , wrapCommand , extractCommand , validateCommand } from ' @saifulapm /emmet-cli' ;
398411
399412// Expand abbreviation
400- const html = await expand (' div.container>p*3' , { syntax: ' html' });
413+ const html = await expandCommand ({
414+ abbreviation: ' div.container>p*3' ,
415+ syntax: ' html' ,
416+ tabStops: false
417+ });
401418
402419// Wrap text
403- const wrapped = await wrap (' div.wrapper' , ' Hello World' , { syntax: ' html' });
420+ const wrapped = await wrapCommand ({
421+ abbreviation: ' div.wrapper' ,
422+ text: ' Hello World' ,
423+ syntax: ' html'
424+ });
404425
405426// Extract abbreviation
406- const abbr = await extract (' div.test' , { syntax: ' html' });
427+ const result = await extractCommand ({
428+ text: ' div.test' ,
429+ syntax: ' html'
430+ });
407431
408432// Validate abbreviation
409- const isValid = await validate (' ul>li*3' , { syntax: ' html' });
433+ const result = await validateCommand ({
434+ abbreviation: ' ul>li*3' ,
435+ syntax: ' html'
436+ });
410437```
411438
412439## License
0 commit comments