How to use cssbeautifier - 10 common examples

To help you get started, we’ve selected a few cssbeautifier examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github beautify-web / js-beautify / python / test-perf-cssbeautifier.py View on Github external
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import io
import os
import copy
import cssbeautifier
options = cssbeautifier.default_options()
options.wrap_line_length = 80
data = ''


def beautifier_test_github_css():
    cssbeautifier.beautify(data, options)


def report_perf(fn):
    import timeit
    iter = 5
    time = timeit.timeit(
        fn +
        "()",
        setup="from __main__ import " +
        fn +
github beautify-web / js-beautify / python / test-perf-cssbeautifier.py View on Github external
def beautifier_test_github_css():
    cssbeautifier.beautify(data, options)
github beautify-web / js-beautify / python / cssbeautifier / __init__.py View on Github external
def beautify(string, opts=default_options()):
    b = Beautifier(string, opts)
    return b.beautify()
github akalongman / sublimetext-codeformatter / codeformatter / lib / scssbeautifier / __init__.py View on Github external
def beautify_file(file_name, opts=default_options()):
    if file_name == '-':  # stdin
        stream = sys.stdin
    else:
        stream = open(file_name)
    content = ''.join(stream.readlines())
    b = Beautifier(content, opts)
    return b.beautify()
github beautify-web / js-beautify / python / cssbeautifier / __init__.py View on Github external
def beautify_file(file_name, opts=default_options()):
    if file_name == '-':  # stdin
        try:
            if sys.stdin.isatty():
                raise Exception()

            stream = sys.stdin
        except Exception:
            print("Must pipe input or define input file.\n", file=sys.stderr)
            usage(sys.stderr)
            raise Exception()
    else:
        stream = open(file_name)

    content = ''.join(stream.readlines())
    b = Beautifier(content, opts)
    return b.beautify()
github akalongman / sublimetext-codeformatter / codeformatter / lib / cssbeautifier / __init__.py View on Github external
def beautify_file(file_name, opts=default_options()):
    if file_name == '-':  # stdin
        stream = sys.stdin
    else:
        stream = open(file_name)
    content = ''.join(stream.readlines())
    b = Beautifier(content, opts)
    return b.beautify()
github akalongman / sublimetext-codeformatter / codeformatter / lib / cssbeautifier / __init__.py View on Github external
def beautify(string, opts=default_options()):
    b = Beautifier(string, opts)
    return b.beautify()

cssbeautifier

CSS unobfuscator and beautifier.

MIT
Latest version published 9 months ago

Package Health Score

56 / 100
Full package analysis

Similar packages