Metadata-Version: 2.1
Name: jxa-builder
Version: 1.0.1
Summary: A Javascript for Automation build system
License: BSD-4-Clause
Author: Sebastian Pilarz
Requires-Python: >=3.8,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pydantic (>=2.5.2,<3.0.0)
Requires-Dist: rich-click (>=1.7.2,<2.0.0)
Requires-Dist: typing-extensions (>=4.8.0,<5.0.0)
Description-Content-Type: text/markdown

# JXA Builder

JavaScript for automation (JXA) builder with automatic dependencies resolution.
At the moment you can build a standalone applets and reusable libraries.

> [!IMPORTANT]
> JXA is Apple's technology, so you can use it only on macOS.

![screenshot](screenshot.png)
![screenshot](screenshot2.png)

### Features

- Easy splitting of your script into modules
- Automatic module dependencies resolution
- Installation/Uninstallation to/from known locations (~/Library/Scripts, /Library/Scripts, /Applications)
- ability to set custom icon for the applet

### Installation

Python 3.8+ is required.
Python3 is already installed on macOS, so no need to install it.

```bash
pip install jxa-builder
## or if you want some isolation
pipx install jxa-builder
```

### Usage

**Project configuration**
Most of the build options can be specified in different ways
The priority from lowest to highest is:

- package.json _(if you use a package manager)_
- jxa.json
- command line arguments

The naming difference between options in command line and json files is that in json files they are camelCase.

So these json config options:

```json
{
  "compMode": "app",
  "depsInstallMode": "system",
  "version": "2.0.0"
  "main": "src/index.js",
  "appIcon": "Neovim.icns",
  "appName": "Neovim",
}
```

are equivalent to these command line options:

```bash
--comp-mode app \
--deps-install-mode system \
--version 2.0.0 \
--main src/index.js \
--app-icon Neovim.icns \
--app-name "Neovim"
```

**To build and install**

```bash
cd /path/to/your/project
jxa-builder build
jxa-builder install
```

```bash
## You can also specify locations explicitly
jxa-builder build --project-dir /path/to/your/project
jxa-builder install --path /path/to/your/project
```

### Notes

By default, shell logs are turned off (enabled using --debug flag)
However, file logs are always on and are stored in
`~/Library/Logs/jxa-builder.log`

