Build JS artifacts with yarn
Project description
Introduction
This package builds JavaScript projects any JS tooling you might happen to use.
It contains a zest.releaser
entry point and a stand-alone command line tool.
Goal
You want to release a package that has a packages.json
on it
and to build the final assets you only have two commands:
- install (dependencies)
- build (the assets)
Usually one does not want to keep the generated files on VCS,
but you want them when releasing with zest.releaser
.
Configuration
For that to work you need to add a yarn.build
section on setup.cfg
with the following configuration options:
[yarn.build]
folder = src/my/package/frontend
install = pnpm install --frozen-lockfile
build = pnpm build
folder
: is a path to where thepackage.json
is locatedinstall
: is the command to install the dependencies that your frontend code needsbuild
: is the command that generates your assets
Credits
This package is a direct inspiration from
zest.pocompile
from Maurits van Rees.
Thanks!
To Do
Add tests
Changelog
3.0.0 (2024-10-01)
Breaking changes
- configuration options are mandatory,
autodiscovery of
packages.json
has been removed - it is no longer tied to
yarn
, nor toyarn build
to generate the assets, you can use whichever tooling you want, please refer to theREADME
2.0.0 (2024-03-01)
- Nothing changed since the alpha release.
2.0.0a1 (2024-02-22)
-
Add linting with
pre-commit
/tox
/ GitHub Actions -
Rename the main module to something else than
build
as it clashes with the distribution https://pypi-hypernode.com/project/build/ -
Update the syntax to python 3.11 and use
pathlib
1.0.0 (2019-02-11)
- No changes since last release
1.0b3 (2018-11-09)
-
Fix logic, to not try to build a project if no package.json could be found
-
Be more quiet if no
yarn.build
section is found onsetup.cfg
1.0b2 (2018-11-09)
- Change option to
folder
as package.json is expected to be there, i.e.
[yarn.build]
folder = path/to/folder/
1.0b1.post0 (2018-11-09)
- Fix (hopefully), pypi rendering
1.0b1 (2018-11-09)
- Allow to configure where package.json is located via a setup.cfg section
[yarn.build]
file = path-to/package.json
1.0a6 (2017-01-06)
- Create universal wheels again
1.0a5 (2017-01-06)
- Pass the parent folder where package.json is
1.0a4 (2017-01-06)
- Typos are fun...
1.0a3 (2017-01-06)
- Ditch wheels by now, only source releases
1.0a2 (2017-01-06)
- Be more verbose
1.0a1 (2017-01-05)
- Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for yarn.build-3.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96ea9a3b9609afe3de25557d923ed7cfafd075026a56627566a79045c27bd8d8 |
|
MD5 | 011471e67fbf8e72aa59c1200d73beb9 |
|
BLAKE2b-256 | 10ffa4929b4febe7c36c875edc9ddd9e13a41ac878da3ee43a641786547d25b0 |