-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lektor-scss plugin per TPA-RFC-29
Context: #27 and <https://gitlab.torproject.org/tpo/tpa/team/-/wikis/policy/tpa-rfc-29-lektor-scss-plugin> This package is an sdist built from the [lektor-scss 1.4.1 tag][] using Python 3.8.13 to be compatible with our python3.8 lektor requirement. I've already vetted the plugin's safety for the RFC. [lektor-scss 1.4.1 tag]: <https://github.com/chaos-bodensee/lektor-scss/tree/1.4.1>
- Loading branch information
Showing
12 changed files
with
518 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 L3D <[email protected]> | ||
Copyright (c) 2019 maxbachmann <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
Metadata-Version: 2.1 | ||
Name: lektor-scss | ||
Version: 1.4.1 | ||
Summary: Lektor plugin to compile css out of sass - based on libsass | ||
Home-page: https://github.com/chaos-bodensee/lektor-scss.git | ||
Author: L3D | ||
Author-email: [email protected] | ||
License: MIT | ||
Keywords: Lektor plugin | ||
Platform: UNKNOWN | ||
Classifier: Development Status :: 5 - Production/Stable | ||
Classifier: Framework :: Lektor | ||
Classifier: Environment :: Plugins | ||
Classifier: Intended Audience :: Developers | ||
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Programming Language :: Python :: 3 | ||
Description-Content-Type: text/markdown | ||
License-File: LICENSE | ||
|
||
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.4.1 | ||
``` | ||
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. | | ||
|
||
|
||
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 --> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
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.4.1 | ||
``` | ||
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. | | ||
|
||
|
||
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 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
Metadata-Version: 2.1 | ||
Name: lektor-scss | ||
Version: 1.4.1 | ||
Summary: Lektor plugin to compile css out of sass - based on libsass | ||
Home-page: https://github.com/chaos-bodensee/lektor-scss.git | ||
Author: L3D | ||
Author-email: [email protected] | ||
License: MIT | ||
Keywords: Lektor plugin | ||
Platform: UNKNOWN | ||
Classifier: Development Status :: 5 - Production/Stable | ||
Classifier: Framework :: Lektor | ||
Classifier: Environment :: Plugins | ||
Classifier: Intended Audience :: Developers | ||
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Programming Language :: Python :: 3 | ||
Description-Content-Type: text/markdown | ||
License-File: LICENSE | ||
|
||
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.4.1 | ||
``` | ||
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. | | ||
|
||
|
||
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 --> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
LICENSE | ||
README.md | ||
lektor_scss.py | ||
setup.py | ||
lektor_scss.egg-info/PKG-INFO | ||
lektor_scss.egg-info/SOURCES.txt | ||
lektor_scss.egg-info/dependency_links.txt | ||
lektor_scss.egg-info/entry_points.txt | ||
lektor_scss.egg-info/requires.txt | ||
lektor_scss.egg-info/top_level.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[lektor.plugins] | ||
scss = lektor_scss:scssPlugin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
libsass==0.21.0 | ||
termcolor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lektor_scss |
Oops, something went wrong.