|
| 1 | +## intersystems-objectscript-template |
| 2 | +This is a template for InterSystems ObjectScript Github repository. |
| 3 | +The template goes also with a few files which let you immedietly compile your ObjecScript files in InterSystems IRIS Community Edition in a docker container |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | +Make sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [Docker desktop](https://www.docker.com/products/docker-desktop) installed. |
| 7 | + |
| 8 | +## Installation |
| 9 | + |
| 10 | +Clone/git pull the repo into any local directory |
| 11 | + |
| 12 | +``` |
| 13 | +$ git clone https://github.com/intersystems-community/objectscript-docker-template.git |
| 14 | +``` |
| 15 | + |
| 16 | +Open the terminal in this directory and run: |
| 17 | + |
| 18 | +``` |
| 19 | +$ docker-compose build |
| 20 | +``` |
| 21 | + |
| 22 | +3. Run the IRIS container with your project: |
| 23 | + |
| 24 | +``` |
| 25 | +$ docker-compose up -d |
| 26 | +``` |
| 27 | + |
| 28 | +## How to Test it |
| 29 | + |
| 30 | +Open IRIS terminal: |
| 31 | + |
| 32 | +``` |
| 33 | +$ docker-compose exec iris iris session iris |
| 34 | +USER>write ##class(dc.PackageSample.ObjectScript).Test() |
| 35 | +``` |
| 36 | +## How to start coding |
| 37 | +This repository is ready to code in VSCode with ObjectScript plugin. |
| 38 | +Install [VSCode](https://code.visualstudio.com/), [Docker](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) and [ObjectScript](https://marketplace.visualstudio.com/items?itemName=daimor.vscode-objectscript) plugin and open the folder in VSCode. |
| 39 | +Open /src/cls/PackageSample/ObjectScript.cls class and try to make changes - it will be compiled in running IRIS docker container. |
| 40 | + |
| 41 | + |
| 42 | +Feel free to delete PackageSample folder and place your ObjectScript classes in a form |
| 43 | +/src/Package/Classname.cls |
| 44 | +[Read more about folder setup for InterSystems ObjectScript](https://community.intersystems.com/post/simplified-objectscript-source-folder-structure-package-manager) |
| 45 | + |
| 46 | +The script in Installer.cls will import everything you place under /src into IRIS. |
| 47 | + |
| 48 | + |
| 49 | +## What's inside the repository |
| 50 | + |
| 51 | +### Dockerfile |
| 52 | + |
| 53 | +The simplest dockerfile which starts IRIS and imports code from /src folder into it. |
| 54 | +Use the related docker-compose.yml to easily setup additional parametes like port number and where you map keys and host folders. |
| 55 | + |
| 56 | + |
| 57 | +### .vscode/settings.json |
| 58 | + |
| 59 | +Settings file to let you immedietly code in VSCode with [VSCode ObjectScript plugin](https://marketplace.visualstudio.com/items?itemName=daimor.vscode-objectscript)) |
| 60 | + |
| 61 | +### .vscode/launch.json |
| 62 | +Config file if you want to debug with VSCode ObjectScript |
| 63 | + |
| 64 | +[Read about all the files in this artilce](https://community.intersystems.com/post/dockerfile-and-friends-or-how-run-and-collaborate-objectscript-projects-intersystems-iris) |
0 commit comments