Skip to content

Commit

Permalink
Merge branch 'sass' into readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrachuk committed Aug 27, 2019
2 parents 3200815 + bd5b827 commit 0fbbdc1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lightweight/content/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Content(ABC):
site: Site

@abstractmethod
def render(self, path: Path, site: Site) -> None:
def render(self, path: Path, site: Site):
"""Render..."""


Expand Down
6 changes: 3 additions & 3 deletions lightweight/content/sass.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path
from typing import TYPE_CHECKING, Callable

from sass import compile
from sass import compile # type: ignore # missing annotations

from lightweight.files import paths
from .content import Content
Expand All @@ -17,7 +17,7 @@
class Sass(Content):
source_path: Path

def render(self, path: Path, site: Site) -> None:
def render(self, path: Path, site: Site):
if self.source_path.is_dir():
css_at_target = construct_relative_css_path(self.source_path, target=path)
[_render(p, css_at_target(p), site.out) for p in paths(f'{self.source_path}/**/*.sass')]
Expand All @@ -36,7 +36,7 @@ def remap(path):
return remap


def _render(source: Path, target: Path, out_root: Path) -> None:
def _render(source: Path, target: Path, out_root: Path):
out_path = out_root / target
sourcemap_path = target.with_name(target.name + '.map')
result, sourcemap = compile(
Expand Down
3 changes: 3 additions & 0 deletions tests/expected/sass/nested/nested/test2.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/expected/sass/nested/test1.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/expected/sass/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0fbbdc1

Please sign in to comment.