Skip to content

Commit

Permalink
move build script out of package (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuadavidthomas authored Mar 23, 2024
1 parent 03b3078 commit 9ef1be3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Now using `nox` for testing.
- Build script has been moved from inside the package to the root of the repository.

### Removed

Expand Down
6 changes: 4 additions & 2 deletions src/wagtail_heroicons/_build.py → build.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@

HEROICONS_LATEST_VERSION = "1.0.6"

NODE_SRC_DIR = Path(__file__).parent.parent.parent / "node_modules" / "heroicons"
DEST_DIR = Path(__file__).parent / "templates" / "heroicons"
NODE_SRC_DIR = Path(__file__).parent / "node_modules" / "heroicons"
DEST_DIR = (
Path(__file__).parent / "src" / "wagtail_heroicons" / "templates" / "heroicons"
)


def build(argv: Sequence[str] | None = None) -> int:
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import pytest

from wagtail_heroicons._build import HEROICONS_LATEST_VERSION
from wagtail_heroicons._build import install_heroicons
from build import HEROICONS_LATEST_VERSION
from build import install_heroicons

from .parser import SVGParser

Expand Down
8 changes: 4 additions & 4 deletions tests/test_build.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import annotations

from wagtail_heroicons._build import HEROICONS_LATEST_VERSION
from wagtail_heroicons._build import build
from wagtail_heroicons._build import install_heroicons
from wagtail_heroicons._build import parse_args
from build import HEROICONS_LATEST_VERSION
from build import build
from build import install_heroicons
from build import parse_args


def test_no_args():
Expand Down

0 comments on commit 9ef1be3

Please sign in to comment.