lektor / lektor-website

The main lektor website.
https://www.getlektor.com/
Other
160 stars 134 forks source link

Use PDM to manage dependencies and build site #377

Open dairiki opened 1 year ago

dairiki commented 1 year ago

This is an alternative to #327, and is roughly equivalent to that PR except that it uses PDM rather than pipenv.

This uses PDM to manage python dependencies:

It also uses PDM's scripts feature (very similar to npm scripts) to define common tasks. E.g. once one has installed PDM and npm, one can just do:

# install python dependencies
pdm install

# build the site
pdm run build

This eliminates the need for the build/test instructions in tox.ini, and simplifies the build/deploy workflow.

TODO

Should probably add a pre-commit hook to ensure pdm.lock is up-to-date.