html

WebJar for html

Лицензия

Лицензия

BSD
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

html
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

html
WebJar for html
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/maxogden/commonjs-html-prettyprinter

Скачать html

Имя Файла Размер
html-1.0.0.pom
html-1.0.0.jar 670 KB
html-1.0.0-sources.jar 22 bytes
html-1.0.0-javadoc.jar 22 bytes
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/html/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>html</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/html/
implementation 'org.webjars.npm:html:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/html/
implementation ("org.webjars.npm:html:1.0.0")
'org.webjars.npm:html:jar:1.0.0'
<dependency org="org.webjars.npm" name="html" rev="1.0.0">
  <artifact name="html" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='html', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "html" % "1.0.0"
[org.webjars.npm/html "1.0.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : concat-stream jar [1.4.7,2)

Модули Проекта

Данный проект не имеет модулей.

html prettyprinter

A node port of beautify-html.js by Nochum Sossonko which is based on jsbeautifier by Einar Lielmanis

Installation

from npm (node package manager)

  npm install html

Usage (command line)

  echo "<h2><strong><a href="http://awesome.com">AwesomeCom</a></strong><span>is awesome</span></h2>" | html

returns:

  <h2>
      <strong>
          <a href=http://awesome.com>AwesomeCom</a>
      </strong>
      <span>
          is awesome
      </span>
  </h2>

html foo.html will write the prettified version to stdout.

html *.html will update in place all matching html files with their prettified versions.

Advanced usage

I find myself constantly using the 'Copy as HTML' feature of the Chrome Inspector:

Copy as HTML

The downside is that that usually the HTML that gets copied is pretty ugly:

Before pretty printing

On OS X you can use pbpaste and pbcopy to stream your clipboard in and out of unix pipes. With the ugly HTML still in your clipboard run this command:

pbpaste | html | pbcopy

Now when you paste your clipboard into an editor you will get nice, pretty printed HTML:

After pretty printing

Upgrading

grab the newest beautify-html.js from js-beautifier and drop it into lib/ as html.js. then add the following code to the bottom of html.js:

  module.exports = { prettyPrint: style_html }

BSD LICENSE

Версии библиотеки

Версия
1.0.0