lektor-scss


Namelektor-scss JSON
Version 1.5.0 PyPI version JSON
download
home_pagehttps://github.com/chaos-bodensee/lektor-scss.git
SummaryLektor plugin to compile css out of sass - based on libsass
upload_time2024-01-25 00:28:24
maintainer
docs_urlNone
authorL3D
requires_python
licenseMIT
keywords lektor plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
             SCSS compiler for lektor
=============================
[![PyPI version](https://badge.fury.io/py/lektor-scss.svg)](https://badge.fury.io/py/lektor-scss)
 [![Downloads](https://pepy.tech/badge/lektor-scss)](https://pepy.tech/project/lektor-scss)
 ![Upload Python Package](https://github.com/chaos-bodensee/lektor-scss/workflows/Upload%20Python%20Package/badge.svg)
 ![Linting Python package](https://github.com/chaos-bodensee/lektor-scss/workflows/Linting%20Python%20package/badge.svg)

SCSS compiler for [Lektor](https://getlektor.com) that compiles css from sass.

 How does it actually work?
----------------------------
 + It uses [libsass](https://github.com/sass/libsass-python)
 + It looks for ``.scss`` and ``.sass`` files *(ignores part files that begin with a underscore e.g. '_testfile.scss') and compiles them as part of the build process.*
 + It only rebuilds the css when it's needed (file changed, a file it imports changed or the config changed).
 + When starting the the development server it watches the files for changes in the background and rebuilds them when needed.

 Installation
-------------
You can install the plugin with Lektor's installer:
```bash
lektor plugins add lektor-scss
```

Or by hand, adding the plugin to the packages section in your lektorproject file:
```ini
[packages]
lektor-scss = 1.5.0
```
 Usage
------
To enable the plugin, pass the ``scss`` flag when starting the development
server or when running a build:
```bash
# build and compile css from scss
lektor build -f scss

# edit site with new generated css
lektor server -f scss
```

 Python3
----------
It is highly recommended to use this plugin with a python3 version of lektor.

Since lektor can be used as a python module it is possible to enforce this *(after lektor is installed eg. with ``pip3 install --user --upgrade lektor``)* with the following command:
```bash
# run a python3 lektor server with new generated css
python3 -m lektor server -f scss
```

 Configuration
-------------
The Plugin has the following settings you can adjust to your needs:

|parameter      |default value      |description                                                                                       |
|---------------|-------------------|--------------------------------------------------------------------------------------------------|
|source_dir     |assets/scss/       | the directory in which the plugin searchs for sass files (subdirectories are included)           |
|output_dir     |assets/css/        | the directory the compiled css files get place at                                                |
|output_style   |compressed         | coding style of the compiled result. choose one of: 'nested', 'expanded', 'compact', 'compressed'|
|source_comments|False              | whether to add comments about source lines                                                       |
|precision      |5                  | precision for numbers                                                                            |
|include_paths  |                   |If you want to include SASS libraries from a different directory, libsass's compile function has a parameter called `include_paths` to add those directories to the search path. |
|use_compile_flag|True              | If True the flag '-scss' is needed. Otherwise not. |


An example file with the default config can be found at ``configs/scss.ini``. For every parameter that is not specified in the config file the default value is used by the plugin.

 Development
-------------
To test and/or develop on this plugin in your running lektor installation, simply place it in the ``packages/`` Folder and have a look at the [Lektor Doku](https://www.getlektor.com/docs/plugins/dev/)

<!-- How to add to pypi: https://packaging.python.org/tutorials/packaging-projects/ -->
<!-- Python RELEASEING moved to github action -->
<!-- You have to edit the version number in README and setup.py manually -->

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/chaos-bodensee/lektor-scss.git",
    "name": "lektor-scss",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Lektor plugin",
    "author": "L3D",
    "author_email": "l3d@c3woc.de",
    "download_url": "https://files.pythonhosted.org/packages/ee/42/90bff8fdbd4dca5a8d10404bddafa417e5b1d3afc63d71e98d7c85fe68d0/lektor-scss-1.5.0.tar.gz",
    "platform": null,
    "description": " SCSS compiler for lektor\n=============================\n[![PyPI version](https://badge.fury.io/py/lektor-scss.svg)](https://badge.fury.io/py/lektor-scss)\n [![Downloads](https://pepy.tech/badge/lektor-scss)](https://pepy.tech/project/lektor-scss)\n ![Upload Python Package](https://github.com/chaos-bodensee/lektor-scss/workflows/Upload%20Python%20Package/badge.svg)\n ![Linting Python package](https://github.com/chaos-bodensee/lektor-scss/workflows/Linting%20Python%20package/badge.svg)\n\nSCSS compiler for [Lektor](https://getlektor.com) that compiles css from sass.\n\n How does it actually work?\n----------------------------\n + It uses [libsass](https://github.com/sass/libsass-python)\n + It looks for ``.scss`` and ``.sass`` files *(ignores part files that begin with a underscore e.g. '_testfile.scss') and compiles them as part of the build process.*\n + It only rebuilds the css when it's needed (file changed, a file it imports changed or the config changed).\n + When starting the the development server it watches the files for changes in the background and rebuilds them when needed.\n\n Installation\n-------------\nYou can install the plugin with Lektor's installer:\n```bash\nlektor plugins add lektor-scss\n```\n\nOr by hand, adding the plugin to the packages section in your lektorproject file:\n```ini\n[packages]\nlektor-scss = 1.5.0\n```\n Usage\n------\nTo enable the plugin, pass the ``scss`` flag when starting the development\nserver or when running a build:\n```bash\n# build and compile css from scss\nlektor build -f scss\n\n# edit site with new generated css\nlektor server -f scss\n```\n\n Python3\n----------\nIt is highly recommended to use this plugin with a python3 version of lektor.\n\nSince lektor can be used as a python module it is possible to enforce this *(after lektor is installed eg. with ``pip3 install --user --upgrade lektor``)* with the following command:\n```bash\n# run a python3 lektor server with new generated css\npython3 -m lektor server -f scss\n```\n\n Configuration\n-------------\nThe Plugin has the following settings you can adjust to your needs:\n\n|parameter      |default value      |description                                                                                       |\n|---------------|-------------------|--------------------------------------------------------------------------------------------------|\n|source_dir     |assets/scss/       | the directory in which the plugin searchs for sass files (subdirectories are included)           |\n|output_dir     |assets/css/        | the directory the compiled css files get place at                                                |\n|output_style   |compressed         | coding style of the compiled result. choose one of: 'nested', 'expanded', 'compact', 'compressed'|\n|source_comments|False              | whether to add comments about source lines                                                       |\n|precision      |5                  | precision for numbers                                                                            |\n|include_paths  |                   |If you want to include SASS libraries from a different directory, libsass's compile function has a parameter called `include_paths` to add those directories to the search path. |\n|use_compile_flag|True              | If True the flag '-scss' is needed. Otherwise not. |\n\n\nAn example file with the default config can be found at ``configs/scss.ini``. For every parameter that is not specified in the config file the default value is used by the plugin.\n\n Development\n-------------\nTo test and/or develop on this plugin in your running lektor installation, simply place it in the ``packages/`` Folder and have a look at the [Lektor Doku](https://www.getlektor.com/docs/plugins/dev/)\n\n<!-- How to add to pypi: https://packaging.python.org/tutorials/packaging-projects/ -->\n<!-- Python RELEASEING moved to github action -->\n<!-- You have to edit the version number in README and setup.py manually -->\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Lektor plugin to compile css out of sass - based on libsass",
    "version": "1.5.0",
    "project_urls": {
        "Homepage": "https://github.com/chaos-bodensee/lektor-scss.git"
    },
    "split_keywords": [
        "lektor",
        "plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "195732eaf71eac4a4d20f2a5820c8a5c108ab177a1262b42275bb133f34e5b97",
                "md5": "1d2da22d273d8b1cdee11185a53f7fd1",
                "sha256": "d5c9249c5de3ed89418fbc9e995da3a2e93e53dea6690ac4ddba286f14f6bc55"
            },
            "downloads": -1,
            "filename": "lektor_scss-1.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d2da22d273d8b1cdee11185a53f7fd1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6099,
            "upload_time": "2024-01-25T00:28:10",
            "upload_time_iso_8601": "2024-01-25T00:28:10.907130Z",
            "url": "https://files.pythonhosted.org/packages/19/57/32eaf71eac4a4d20f2a5820c8a5c108ab177a1262b42275bb133f34e5b97/lektor_scss-1.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ee4290bff8fdbd4dca5a8d10404bddafa417e5b1d3afc63d71e98d7c85fe68d0",
                "md5": "a274f06701237052021bd2961969797e",
                "sha256": "9bc6043d07d6b91a3daf40de18682b3e4889309ab15520e5672410caea92e4bb"
            },
            "downloads": -1,
            "filename": "lektor-scss-1.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a274f06701237052021bd2961969797e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5694,
            "upload_time": "2024-01-25T00:28:24",
            "upload_time_iso_8601": "2024-01-25T00:28:24.846617Z",
            "url": "https://files.pythonhosted.org/packages/ee/42/90bff8fdbd4dca5a8d10404bddafa417e5b1d3afc63d71e98d7c85fe68d0/lektor-scss-1.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-25 00:28:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chaos-bodensee",
    "github_project": "lektor-scss",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "lektor-scss"
}
        
L3D
Elapsed time: 0.17121s