Skip to main content

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 the package.json is located
  • install: is the command to install the dependencies that your frontend code needs
  • build: 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 to yarn build to generate the assets, you can use whichever tooling you want, please refer to the README

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 on setup.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yarn.build-3.0.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

yarn.build-3.0.0-py2.py3-none-any.whl (3.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file yarn.build-3.0.0.tar.gz.

File metadata

  • Download URL: yarn.build-3.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for yarn.build-3.0.0.tar.gz
Algorithm Hash digest
SHA256 60b3e14839344b2bf086d4b4575d67733cbcf8b204c359a75ebbf0415b0a262f
MD5 7c35254167eba35e8a7927bee3f18897
BLAKE2b-256 3330bf0e73d9ef5ee047f6d61c87f6f39d25655b97bb7f04f6f2ae78eec9b97c

See more details on using hashes here.

File details

Details for the file yarn.build-3.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: yarn.build-3.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for yarn.build-3.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 96ea9a3b9609afe3de25557d923ed7cfafd075026a56627566a79045c27bd8d8
MD5 011471e67fbf8e72aa59c1200d73beb9
BLAKE2b-256 10ffa4929b4febe7c36c875edc9ddd9e13a41ac878da3ee43a641786547d25b0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page