-
-
Notifications
You must be signed in to change notification settings - Fork 45
Create a new Apache Royale library project in Visual Studio Code
Learn to set up a project in Visual Studio Code to create a SWC library for Apache Royale.
-
Install the ActionScript & MXML extension for Visual Studio Code.
-
Create a new directory for your project, and open it in Visual Studio Code.
To open a directory, select the File menu → Open... or click Open Folder button in the Explorer pane.
-
Create a file named asconfig.json in the root directory of your project, and add the following content:
{ "type": "lib", "compilerOptions": { "targets": [ "SWF", "JSRoyale" ], "source-path": [ "src" ], "include-sources": [ "src" ], "output": "bin/MyLibrary.swc" } }In addition to
include-sources, you may also use theinclude-classesorinclude-namespacescompiler options to include code in your library. See Library Compiler Options for asconfig.json for details.If you need to set the
configfield to"js", you must replace the"JSRoyale"target with"JS"instead. Similarly, when using the config value"node", replace the"JSRoyale"target with"JSNode". -
Create directory named src.
-
Inside src, create any classes that you want to include in the library SWC.
- Adobe AIR (Mobile)
- Adobe AIR (Desktop)
- Adobe Flash Player
- Apache Royale
- HTML and JS (no framework)
- Node.js
- Feathers SDK
- Adobe Animate
- Flex SDK
- Library (SWC)
- Royale Library (SWC)