How to use the jsbeautifier.__version__.__version__ function in jsbeautifier

To help you get started, we’ve selected a few jsbeautifier 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 / setup.py View on Github external
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.pytest_args = ['--assert=plain'] + [DIR + \
            x for x in os.listdir(DIR) if x.endswith('.py') and x[0] not in '._']

    def run_tests(self):
        # import here, cause outside the eggs aren't loaded
        import pytest
        errno = pytest.main(self.pytest_args)
        sys.exit(errno)


setup(name='jsbeautifier',
      version=__version__,
      description='JavaScript unobfuscator and beautifier.',
      long_description=('Beautify, unpack or deobfuscate JavaScript. '
                        'Handles popular online obfuscators.'),
      author='Liam Newman, Einar Lielmanis, et al.',
      author_email='team@beautifier.io',
      url='https://beautifier.io',
      entry_points={
          'console_scripts': [
              'js-beautify = jsbeautifier:main'
          ]
      },
      packages=['jsbeautifier',
                'jsbeautifier.tests', 'jsbeautifier.tests.generated',
                'jsbeautifier.core',
                'jsbeautifier.javascript',
                'jsbeautifier.unpackers', 'jsbeautifier.unpackers.tests'],
github bendangelo / dotfiles / sublime / packages / JsFormat / libs / jsbeautifier / __init__.py View on Github external
def usage(stream=sys.stdout):

    print("jsbeautifier.py@" + __version__ + """

Javascript beautifier (http://jsbeautifier.org/)

Usage: jsbeautifier.py [options] 

     can be "-", which means stdin.
     defaults to stdout

Input options:

 -i,  --stdin                      read input from stdin

Output options:

 -s,  --indent-size=NUMBER         indentation size. (default 4).
 -c,  --indent-char=CHAR           character to indent with. (default space).
github beautify-web / js-beautify / python / cssbeautifier / css / beautifier.py View on Github external
def usage(stream=sys.stdout):

    print("cssbeautifier.py@" + __version__ + """

CSS beautifier (https://beautifier.io/)

""", file=stream)
    if stream == sys.stderr:
        return 1
    else:
        return 0
github beautify-web / js-beautify / python / cssbeautifier / __init__.py View on Github external
def usage(stream=sys.stdout):

    print("cssbeautifier.py@" + __version__ + """

CSS beautifier (https://beautifier.io/)

Usage: cssbeautifier.py [options] 

     can be "-", which means stdin.

Input options:

 -i,  --stdin                      Read input from stdin

Output options:

 -s,  --indent-size=NUMBER         Indentation size. (default 4).
 -c,  --indent-char=CHAR           Character to indent with. (default space).
 -e,  --eol=STRING                 Character(s) to use as line terminators.
github brickseditor / editor / bower_components / js-beautify / python / jsbeautifier / __init__.py View on Github external
def usage(stream=sys.stdout):

    print("jsbeautifier.py@" + __version__ + """

Javascript beautifier (http://jsbeautifier.org/)

Usage: jsbeautifier.py [options] 

     can be "-", which means stdin.
     defaults to stdout

Input options:

 -i,  --stdin                      read input from stdin

Output options:

 -s,  --indent-size=NUMBER         indentation size. (default 4).
 -c,  --indent-char=CHAR           character to indent with. (default space).
github brickseditor / editor / bower_components / js-beautify / python / jsbeautifier / __init__.py View on Github external
elif opt in ('--jslint-happy', '-j'):
            js_options.jslint_happy = True
        elif opt in ('--eval-code'):
            js_options.eval_code = True
        elif opt in ('--brace-style', '-b'):
            js_options.brace_style = arg
        elif opt in ('--unescape-strings', '-x'):
            js_options.unescape_strings = True
        elif opt in ('--e4x', '-X'):
            js_options.e4x = True
        elif opt in ('--wrap-line-length ', '-w'):
            js_options.wrap_line_length = int(arg)
        elif opt in ('--stdin', '-i'):
            file = '-'
        elif opt in ('--version', '-v'):
            return print(__version__)
        elif opt in ('--help', '--usage', '-h'):
            return usage()


    if not file:
        print("Must define at least one file.", file=sys.stderr)
        return usage(sys.stderr)
    else:
        try:
            if outfile == 'stdout':
                print(beautify_file(file, js_options))
            else:
                mkdir_p(os.path.dirname(outfile))
                with open(outfile, 'w') as f:
                    f.write(beautify_file(file, js_options) + '\n')
        except Exception as ex:
github akalongman / sublimetext-codeformatter / codeformatter / lib / cssbeautifier / __init__.py View on Github external
def usage(stream=sys.stdout):

    print("cssbeautifier.py@" + __version__ + """

CSS beautifier (http://jsbeautifier.org/)

""", file=stream)
    if stream == sys.stderr:
        return 1
    else:
        return 0
github Masood-M / yalih / jsbeautifier / cssbeautifier / css / beautifier.py View on Github external
def usage(stream=sys.stdout):

    print("cssbeautifier.py@" + __version__ + """

CSS beautifier (https://beautifier.io/)

""", file=stream)
    if stream == sys.stderr:
        return 1
    else:
        return 0
github akalongman / sublimetext-codeformatter / codeformatter / lib / scssbeautifier / __init__.py View on Github external
def usage(stream=sys.stdout):

    print("cssbeautifier.py@" + __version__ + """

CSS beautifier (http://jsbeautifier.org/)

""", file=stream)
    if stream == sys.stderr:
        return 1
    else:
        return 0