Coder Social home page Coder Social logo

sebastianpilarz / jxa-builder Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.04 MB

A builder for JXA scripts with modules support.

License: BSD 4-Clause "Original" or "Old" License

Python 99.19% JavaScript 0.81%
javascript-for-automation jxa macos python3

jxa-builder's Introduction

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

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.

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:

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

are equivalent to these command line options:

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

cd /path/to/your/project
jxa-builder build
jxa-builder install
## 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

jxa-builder's People

Contributors

sebastianpilarz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.