Closed velara3 closed 10 months ago
The way typescript does it is if you have a file, myapp.ts, it will compile that to myapp.js. It's very basic but very simple. You don't even need a tsconfig (I believe).
Project before compilation:
/project
myapp.ts
After compilation:
/project
myapp.ts
myapp.js
A starting slash is probably considered an absolute path by the compiler:
"js-output": "/public/js",
Did you try this?
"js-output": "public/js",
That's what I have now:
{
"config": "js",
"compilerOptions": {
"debug": false,
"source-path": [
"src"
],
"js-output": "public/js",
"html-template": "astemplate.html",
"source-map": true
},
"mainClass": "MyApp"
}
This is the output in the /project/public directory:
It publishes to the /public/js folder the sub folders /bin/js-debug/
/project
/src
- myapp.as
/public
/js
/bin
/js-debug
/library
/org
- index.html
- myapp.as
- myapp.as.map
What I'd like if possible is export one single js in the same directory or to the /public directory:
/project
/src
- myapp.as
- myapp.js
/project
/src
- myapp.as
/public
- myapp.js
Or sub directory:
/project
/src
- myapp.as
/public
/js
- myapp.as
- myapp.as.map
In this case, the html page is already built and in the public directory. So I just need to get the js app into the root or sub directory of the index page if possible.
Side note: What are, /library and /org used for? Can they not be exported in debug?
What I'd like if possible is export one single js in the same directory or to the /public directory:
Royale does not currently support outputting a single JS file in a specific directory. It will always create js-debug, js-release, or both. If you do a release build, it will generate a single JS file, but it will go in the js-release directory.
You'll need to open a feature request for https://github.com/apache/royale-compiler. vscode-as3mxml has no control over how Royale outputs its JS code.
In this case, the html page is already built and in the public directory.
If you have your own HTML page, you can omit the html-template compiler option (or possibly set it to an empty string), and the Royale compiler won't create its own index.html.
Side note: What are, /library and /org used for? Can they not be exported in debug?
I believe that library contains the Google Closure Library, which Royale depends on. The org directory probably contains the classes from org.apache.royale.* package. The Language
class, in particular, is needed even if you aren't using the Royale framework. It provides implementations of some of the features of AS3 that aren't native to JS.
In my application I have setup as following (before compilation):
I want to output to a single .js file to the /public/js directory but I'm getting the following error:
I'm using the js-output compiler option:
What I want: