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)

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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

Supported by

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