Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

better-emmet-plugin

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

better-emmet-plugin

Emmet abbreviation parser for better-dom

  • 1.0.0-rc.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

better-emmet-plugin
NPM version NPM downloads Build Status Coverage Status Bower version

Emmet abbreviation parser for better-dom

Html strings are annoyingly verbose. Let's fix that with Emmet. Compare the HTML string:

DOM.create("<ul><li class='list-item'></li><li class='list-item'></li><li class='list-item'></li></ul>");

to the equivalent micro template

DOM.create(DOM.emmet("ul>li.list-item*3"));

Take a look at the Emmet cheat sheet for more examples, but be aware about the differences.

Differences from emmet.io parser

  1. Element aliases are not supported
  2. Implied tag names are not supported
  3. a{text} instead of a>{text} is not supported
  4. Operator ^ is not supported
  5. Expandos are not supported
  6. Boolean attributes (attributes are boolean by default)
  7. Default attributes are not supported
  8. Short tags are not supported

Do not be crazy with microtemplates!

Several recommendations from the emmet docs:

Abbreviations are not a template language, they don’t have to be “readable”, they have to be “quickly expandable and removable”.

You don’t really need to write complex abbreviations. Stop thinking that “typing” is the slowest process in web-development. You’ll quickly find out that constructing a single complex abbreviation is much slower and error-prone than constructing and typing a few short ones.

Browser support

Desktop
  • Chrome
  • Safari 6.0+
  • Firefox 16+
  • Opera 12.10+
  • Internet Explorer 8+ (see notes)
Mobile
  • iOS Safari 6+
  • Android 2.3+
  • Chrome for Android

Keywords

FAQs

Package last updated on 11 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc