# Building ACookies

This directory contains the readable sources distributed with ACookies. The
WordPress server does not need Node.js or the development dependencies.

Use Node.js 20 or newer. From this directory:

```sh
npm ci
npm run build
```

The lockfile pins development dependencies. The build uses `@wordpress/scripts`
and WordPress's own JavaScript libraries; it does not bundle another copy of
React. `src/banner/index.js` produces `build/banner/`, and
`src/cookie-policy/index.js` produces `build/cookie-policy/`, including the
WordPress script dependency manifests. `assets/consent-bridge.js` and
`assets/admin.js` are readable JavaScript and need no compilation. Their
stylesheets in `assets/` also need no build step.

All sources needed to reproduce the compiled assets are included in this ZIP.
No access to a separate repository is required.
Sources and included assets are licensed under GPL-2.0-or-later unless their
own notices specify another GPL-compatible license. The Premium distribution's
Freemius SDK retains its upstream license notices; that SDK is excluded from Free.

The repository packaging command creates a source upload for Freemius. The
WordPress.org distribution is the Free ZIP produced by Freemius preprocessing;
the source upload contains Premium gates and must not be submitted as Free.
