mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-23 04:40:06 +00:00
css-beautify is a separate PyPI package
This commit is contained in:
parent
9c6d38a01e
commit
5f77b15a56
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@ gh-pages
|
||||
gh
|
||||
|
||||
*.pyc
|
||||
python/*/__pycache__
|
||||
python/MANIFEST
|
||||
python/build
|
||||
python/dist
|
||||
|
@ -85,7 +85,11 @@ To install the Python version of the beautifier:
|
||||
```bash
|
||||
$ pip install jsbeautifier
|
||||
```
|
||||
Unlike the JavaScript version, the Python version can only reformat JavaScript. It does not work against HTML or CSS files.
|
||||
Unlike the JavaScript version, the Python version can only reformat JavaScript. It does not work against HTML or CSS files, but you can install _css-beautify_ for CSS (installs _jsbeautifier_ automatically)
|
||||
|
||||
```bash
|
||||
$ pip install cssbeautifier
|
||||
```
|
||||
|
||||
# Usage
|
||||
You can beautify javascript using JS Beautifier in your web browser, or on the command-line using node.js or python.
|
||||
|
49
python/setup-css.py
Executable file
49
python/setup-css.py
Executable file
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from setuptools import setup
|
||||
from jsbeautifier.__version__ import __version__
|
||||
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
DIR = 'cssbeautifier/tests/'
|
||||
|
||||
|
||||
class PyTest(TestCommand):
|
||||
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='cssbeautifier',
|
||||
version=__version__,
|
||||
description='CSS unobfuscator and beautifier.',
|
||||
long_description=('Beautify, unpack or deobfuscate CSS'),
|
||||
author='Liam Newman, Einar Lielmanis, et al.',
|
||||
author_email='team@beautifier.io',
|
||||
url='https://beautifier.io',
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'css-beautify = cssbeautifier:main'
|
||||
]
|
||||
},
|
||||
packages=['cssbeautifier',
|
||||
'cssbeautifier.tests', 'cssbeautifier.tests.generated',
|
||||
'cssbeautifier.css'],
|
||||
install_requires=["jsbeautifier>=__version__", "six>=1.13.0", "editorconfig>=0.12.2"],
|
||||
license='MIT',
|
||||
test_suite='pytest.collector',
|
||||
cmdclass={'test': PyTest},
|
||||
|
||||
)
|
Loading…
Reference in New Issue
Block a user