New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

prettyme

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettyme

A tiny prettifier

latest
Source
npmnpm
Version
2.1.9
Version published
Maintainers
1
Created
Source

prettyme

A tiny prettyfier for HTML and CSS

  • Install
npm install prettyme
  • Usage

You need to include the file(s) of the language(s) to use.

import prettyme from 'prettyme';
import html from 'prettyme/languages/html';

prettyme.init({
  language: 'html',
  selector: '.prettyme'
});

prettyme.load();
  • Run depelopment watch
npm run dev

Open browser pointing to http://localhost:8383/example/

  • Run tests
npm run test
  • Build dist
npm run build
  • Upload build

The build must be generated before (point 6)

npm publish
  • List of methods
  • init: sets initial options.
    • language: 'html', 'css' or 'json'
    • selector: CSS selector to use in load method.
    • lines: when true show line numbers.
  • load: formats every selector set in initial options.
  • Create new language
  • Create language in src/languages this will need:
    • create lexer in src/languages

FAQs

Package last updated on 12 May 2018

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