royale-compiler icon indicating copy to clipboard operation
royale-compiler copied to clipboard

Compile to a single file with no directories

Open velara3 opened this issue 2 years ago • 0 comments

What I'd like if possible is to be able to export one single js file in the same directory as the .as file or to sub directory when saving or calling build.

This is similar to the way typescript does it. If you have a file, myapp.ts, anywhere in your project, it will compile that to myapp.js when you save the file or call build. AFAIK it will compile the selected file and all it's dependencies. It's very basic but very simple. I don't believe you need a tsconfig to get this option. If possible, enable the compiler to be given a file and export it to js in the same location.

Project before compilation:

/project 
   myapp.as

After compilation:

/project 
   myapp.as
   myapp.js

The release build option creates a single file but it also puts this into two sub directories:

/project
   myapp.as
  /bin/js/myapp.js

This is causing some path issues where the page the browser can't access the .as file because it is in a sub directory.

More details here.

VSCode as3mxml extension

velara3 avatar Dec 24 '23 00:12 velara3