2.1.9 • Published 6 years ago

prettyme v2.1.9

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

prettyme

A tiny prettyfier for HTML and CSS

  1. Install
npm install prettyme
  1. 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();
  1. Run depelopment watch
npm run dev

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

  1. Run tests
npm run test
  1. Build dist
npm run build
  1. Upload build

The build must be generated before (point 6)

npm publish
  1. 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.
  1. Create new language
  • Create language in src/languages this will need:
    • create lexer in src/languages
2.1.9

6 years ago

2.1.8

6 years ago

2.1.7

6 years ago

2.1.6

6 years ago

2.1.5

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago