Code Monkey home page Code Monkey logo

Comments (4)

velara3 avatar velara3 commented on June 11, 2024

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

from vscode-as3mxml.

joshtynjala avatar joshtynjala commented on June 11, 2024

A starting slash is probably considered an absolute path by the compiler:

"js-output": "/public/js",

Did you try this?

"js-output": "public/js",

from vscode-as3mxml.

velara3 avatar velara3 commented on June 11, 2024

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:

image

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?

from vscode-as3mxml.

joshtynjala avatar joshtynjala commented on June 11, 2024

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.

from vscode-as3mxml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.