You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

206 lines
5.8 KiB

4 years ago
  1. Metadata-Version: 2.1
  2. Name: lesscpy
  3. Version: 0.14.0
  4. Summary: Python LESS compiler
  5. Home-page: https://github.com/lesscpy/lesscpy
  6. Author: Jóhann T Maríusson
  7. Author-email: jtm@robot.is
  8. License: MIT
  9. Platform: UNKNOWN
  10. Classifier: Development Status :: 5 - Production/Stable
  11. Classifier: Environment :: Console
  12. Classifier: Intended Audience :: End Users/Desktop
  13. Classifier: Intended Audience :: Developers
  14. Classifier: Intended Audience :: System Administrators
  15. Classifier: License :: OSI Approved :: MIT License
  16. Classifier: Operating System :: OS Independent
  17. Classifier: Programming Language :: Python
  18. Classifier: Programming Language :: Python :: 2
  19. Classifier: Programming Language :: Python :: 2.7
  20. Classifier: Programming Language :: Python :: 3
  21. Classifier: Programming Language :: Python :: 3.4
  22. Classifier: Programming Language :: Python :: 3.5
  23. Classifier: Programming Language :: Python :: 3.6
  24. Classifier: Programming Language :: Python :: 3.7
  25. Classifier: Programming Language :: Python :: Implementation :: CPython
  26. Classifier: Programming Language :: Python :: Implementation :: PyPy
  27. Classifier: Topic :: Software Development :: Code Generators
  28. Classifier: Topic :: Software Development :: Pre-processors
  29. Requires-Dist: ply
  30. Requires-Dist: six
  31. LESSCPY
  32. =======
  33. .. image:: https://travis-ci.org/lesscpy/lesscpy.png?branch=master
  34. :target: https://travis-ci.org/lesscpy/lesscpy
  35. .. image:: https://coveralls.io/repos/lesscpy/lesscpy/badge.png
  36. :target: https://coveralls.io/r/lesscpy/lesscpy
  37. .. image:: https://img.shields.io/pypi/dm/lesscpy.svg
  38. :target: https://pypi.python.org/pypi/lesscpy
  39. .. image:: https://img.shields.io/pypi/v/lesscpy.svg
  40. :target: https://pypi.python.org/pypi/lesscpy
  41. .. image:: https://img.shields.io/pypi/wheel/lesscpy.svg
  42. :target: https://pypi.python.org/pypi/lesscpy
  43. :alt: Wheel Status
  44. .. image:: https://img.shields.io/pypi/l/lesscpy.svg
  45. :target: https://pypi.python.org/pypi/lesscpy
  46. :alt: License
  47. Python LESS Compiler.
  48. A compiler written in Python for the LESS language. For those of us not willing
  49. or able to have node.js installed in our environment. Not all features of LESS
  50. are supported (yet). Some features wil probably never be supported (JavaScript
  51. evaluation). This program uses PLY (Python Lex-Yacc) to tokenize / parse the
  52. input and is considerably slower than the NodeJS compiler. The plan is to
  53. utilize this to build in proper syntax checking and perhaps YUI compressing.
  54. This is an early version, so you are likely to find bugs.
  55. For more information on LESS:
  56. http://lesscss.org/ or https://github.com/cloudhead/less.js
  57. Development files:
  58. https://github.com/lesscpy/lesscpy
  59. Supported features
  60. ------------------
  61. - Variables
  62. - String interpolation
  63. - Mixins (nested, calls, closures, recursive)
  64. - Guard expressions
  65. - Parametered mixins (class / id)
  66. - @arguments
  67. - Nesting
  68. - Escapes ~/e()
  69. - Expressions
  70. - Keyframe blocks
  71. - Color functions (lighten, darken, saturate, desaturate, spin, hue, mix,
  72. saturation, lightness)
  73. - Other functions (round, increment, decrement, format '%(', ...)
  74. Differences from less.js
  75. ------------------------
  76. - All colors are auto-formatted to #nnnnnn. eg, #f7e923
  77. - Does not preserve CSS comments
  78. Not supported
  79. -------------
  80. - JavaScript evaluation
  81. Requirements
  82. ------------
  83. - Python 2.7, 3.4, 3.5, 3.6 or 3.7
  84. - ply (Python Lex-Yacc) (check requirements.txt)
  85. - six
  86. Installation
  87. ------------
  88. To install lesscpy from the `Python Package Index`_, simply:
  89. .. code-block:: bash
  90. $ pip install lesscpy
  91. To do a local system-wide install:
  92. .. code-block:: bash
  93. python setup.py install
  94. Or simply place the package into your Python path. Or rather use packages
  95. provided by your distribution (openSUSE has them at least).
  96. Compiler script Usage
  97. ---------------------
  98. .. code-block:: text
  99. usage: lesscpy [-h] [-v] [-I INCLUDE] [-V] [-C] [-x] [-X] [-t] [-s SPACES]
  100. [-o OUT] [-r] [-f] [-m] [-D] [-g] [-S] [-L] [-N]
  101. target [output]
  102. LessCss Compiler
  103. positional arguments:
  104. target less file or directory
  105. output output file path
  106. optional arguments:
  107. -h, --help show this help message and exit
  108. -v, --version show program's version number and exit
  109. -I INCLUDE, --include INCLUDE
  110. Included less-files (comma separated)
  111. -V, --verbose Verbose mode
  112. -C, --dont_create_dirs
  113. Creates directories when outputing files (lessc non-
  114. compatible)
  115. Formatting options:
  116. -x, --minify Minify output
  117. -X, --xminify Minify output, no end of block newlines
  118. -t, --tabs Use tabs
  119. -s SPACES, --spaces SPACES
  120. Number of startline spaces (default 2)
  121. Directory options:
  122. Compiles all *.less files in directory that have a newer timestamp than
  123. it's css file.
  124. -o OUT, --out OUT Output directory
  125. -r, --recurse Recursive into subdirectorys
  126. -f, --force Force recompile on all files
  127. -m, --min-ending Add '.min' into output filename. eg, name.min.css
  128. -D, --dry-run Dry run, do not write files
  129. Debugging:
  130. -g, --debug Debugging information
  131. -S, --scopemap Scopemap
  132. -L, --lex-only Run lexer on target
  133. -N, --no-css No css output
  134. << jtm@robot.is @_o >>
  135. Python usage
  136. ------------
  137. If you want to use the compiler from within Python, you can do it like this:
  138. .. code-block:: python
  139. import lesscpy
  140. from six import StringIO
  141. print(lesscpy.compile(StringIO(u"a { border-width: 2px * 3; }"), minify=True))
  142. The output will be:
  143. .. code-block:: text
  144. a{border-width:6px;}
  145. License
  146. -------
  147. See the LICENSE file
  148. .. _`Python Package Index`: https://pypi.python.org/pypi/lesscpy