Skip to content

Commit

Permalink
Accurate Readme and Build Script Bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
eppfel committed Feb 1, 2015
1 parent 3d6c5c0 commit 04eacd6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions JXA.sublime-build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
{
"name": "Build App",
"shell_cmd": "osacompile -l JavaScript -o $file_base_name.app $file_name"
},
{
"name": "Build Script Bundle",
"shell_cmd": "osacompile -l JavaScript -o $file_base_name.scptd $file_name"
}
]
}
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# JXASublimeText
Build a package to work with JXA in Sublime Text 3. This works just on Mac OSX Yosemite (10.10). As a first step I included a build and a run command.
This package makes it easier to use your favorite editor Sublime Text to program with JavaScript for Automation. This works just on Mac OSX Yosemite (10.10). For now I created the build system.

## Build System
Run and Build commands for Scripts, Script Bundles and Applets. Choose 'JXA' from `Tools > Build Systems`.

The standard `Build` command creates an executable and in Apple Script Editor editable script file (.scpt).

The `Run` command executes the script directly in ST.
In the command palette are more variants to build:
- `Build: App`: Build an executable application (.app)
- `Build: App (execute only)`: Build an executable application (.app), which can not be read, nor edited.
- `Build: Script Bundle`: Build an executable Script Bundle (.scptd)

The Build System takes a vanilla JavaScript file and runs the shell command `osascript -l Javascript [file_name]` or `osacompile -l JavaScript -o [file_name].scpt [file_name]`. Look the `osacompile` manual for more options.

0 comments on commit 04eacd6

Please sign in to comment.