docpad-plugin-beautify

2.0.0-alpha1 • Public • Published

Beautify Plugin for DocPad

Build Status NPM version Dependency Status Development Dependency Status
Gittip donate button Flattr donate button

Beautify HTML, CSS and JavaScript files from DocPad using JS Beautify.

Install

docpad install beautify

Usage

Any HTML, CSS or JavaScript file that is processed in src/documents will be beautified.

Configure

Defaults

The default configuration for this plugin is the equivalant of adding the following Beautify options to your DocPad configuration file:

plugins:
    uglify:
        # Enable HTML beautification. 
        html: true
 
        # Enable CSS beautification. 
        css: true
 
        # Enable JavaScript beautification. 
        js: true
 
        # The Beautify options at http://github.com/einars/js-beautify#options 
        indent_size: 4
        indent_char: " "
        indent_level: 0
        indent_with_tabs: false
        preserve_newlines: true
        max_preserve_newlines: 10
        jslint_happy: false
        brace_style: "collapse"
        keep_array_indentation: false
        keep_function_indentation: false
        space_before_conditional: true
        break_chained_methods: false
        eval_code: false
        unescape_strings: false
        wrap_line_length: 0

Template Configuration

It is possible to override the default configuration on a per-template basis:

---
beautify:
    indent_size: 10
---
 
.tabs{color:rgb(255, 255, 0)}

History

Discover the change history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

  • Rob Loach (https://github.com/robloach)

Sponsors

No sponsors yet! Will you be the first?

Gittip donate button Flattr donate button

Contributors

These amazing people have contributed code to this project:

Become a contributor!

License

Licensed under the incredibly permissive MIT license

Copyright © Rob Loach (http://github.com/robloach)

Package Sidebar

Install

npm i docpad-plugin-beautify

Weekly Downloads

1

Version

2.0.0-alpha1

License

MIT

Last publish

Collaborators

  • robloach