Code Monkey home page Code Monkey logo

Comments (5)

joshtynjala avatar joshtynjala commented on September 28, 2024

Try changing your asconfig.json file like this:

{
	"config": "airmobile",
	"compilerOptions": {
		"targets": [
			"JSFlex"
		],
		"output": "MobileStocks"
	},
	"application": "MobileStocks/MobileStocks-app.xml",
	"files":
	[
		"MobileStocks/src/main/flex/MobileStocks.mxml"
	]
}

Right now, you have it set to build both SWF and JS output, and this should make it JS only.

from asconfigc.

celeryness avatar celeryness commented on September 28, 2024

That didn't quite do the job for me, as I still get an error:

Error: ENOENT: no such file or directory, open '/Volumes/LocalData/Users/mick/flex-projects/MobileStocks/bin/js-debug/MobileStocks-app.xml'

I wondered if it was a permissions issue with node as I'm working on a mac and it can get a bit screwy with node and npm sometimes, but I went out into the terminal and ran asconfigc manually as sudo and I still get the same error. I have also closed and reopened vscode as well but no joy. My original workaround of copying the descriptor file into the destination folder doesn't seem to work either now which is pretty strange. I have gone back to my original workaround and config as I can get that to work.

from asconfigc.

joshtynjala avatar joshtynjala commented on September 28, 2024

You might also try making the MobileStocks directory the root of your workspace and moving asconfig.json there.

{
	"config": "airmobile",
	"compilerOptions": {
		"targets": [
			"JSFlex"
		],
		"output": "."
	},
	"application": "MobileStocks-app.xml",
	"files":
	[
		"src/main/flex/MobileStocks.mxml"
	]
}

It could certainly be that there's a bug where moving everything down a subdirectory doesn't work for some reason. Or maybe it's because you're using the "airmobile" config value. I have literally never actually tried to build a FlexJS/Royale project that targets Adobe AIR. Since AIR's support for HTML/JS/CSS isn't that great, I'm not sure it's worth pursuing that direction.

from asconfigc.

celeryness avatar celeryness commented on September 28, 2024

I had to get back to the "day job" - sorry I didn't reply so quickly to your last comment. My actual intention is to go out to air mobile still using flex/actionscript (but with the FlexJS libraries/components), while having a potential fall-back JS version that I could use for Cordova.

I did what you suggested and you are right in that there seems to be a restriction that the directory is structured a certain way - maybe that's the compiler itself that's expecting that? I know some of the history and I've been on the Flex mailing lists since the move to Apache so I'm not surprised that there are some limitations to folder structures, and some of that probably comes from the FB days. I have some ant tasks that I've been using for years with FlashDevelop - but as I'm moving over to vscode I wanted to give asconfigc a go. If I get time I'll pull your repo and see if I can hack a solution.

I went back to your original suggestion/configuration, and for anyone reading this - that works with the expected folder structure, and I just added an extra target for "SWF". One thing though was the output SWF ended up in a slightly weird place:

185562 bytes written to /Volumes/LocalData/Users/mick/flex-projects/MobileStocks/src/main/flex/MobileStocks.swf

Cheers Josh

from asconfigc.

joshtynjala avatar joshtynjala commented on September 28, 2024

One thing though was the output SWF ended up in a slightly weird place:

If you don't specify an output path, the compiler creates the SWF in the same directory as your project's main class. I wish it were the current working directory instead, but when I mentioned the possibility of changing it, at least one major/influential Apache contributor was strongly opposed because it would disrupt his established workflow he'd been using for years. It didn't seem worth arguing over.

from asconfigc.

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.