# Custom picker (source)

Readable source of the "Custom" date picker (**Settings → Datepicker library**). It ships with the plugin so the built files can be reviewed and rebuilt. The bundle entry point is `basic/index.js`; code shared with other scripts lives in `assets-src/shared/`.

## Build

Requires Node.js and npm. From the plugin folder, where `package.json` and `webpack.config.js` are:

```sh
npm install      # installs @wordpress/scripts
npm run build    # wp-scripts build
```

The build writes to `assets/picker/`: `index.js`, `index.css`, `index-rtl.css` and `index.asset.php` (script dependencies and version). `@wordpress/scripts` empties that folder before each build, so do not keep other files there.

`node_modules/` is only needed for the build, not on a site. The unit tests (`npm test`) are not part of the plugin download.
