bowlerhatllc / asconfigc Goto Github PK
View Code? Open in Web Editor NEWCommand line utility that builds ActionScript projects configured with an asconfig.json file.
Home Page: https://www.npmjs.com/package/asconfigc
License: Apache License 2.0
Command line utility that builds ActionScript projects configured with an asconfig.json file.
Home Page: https://www.npmjs.com/package/asconfigc
License: Apache License 2.0
I have a asconfig.json file which looks like this:
{
"config": "royale",
"type": "lib",
"compilerOptions": {
"debug": true,
"js-output-type": "royale",
"define": [
{
"name": "COMPILE::SWF",
"value": false
},
{
"name": "COMPILE::JS",
"value": true
}
]
},
"files":
[
"src/main/royale/TestingClasses.as"
]
}
I'm getting an error when trying to compile it:
Error: Invalid asconfig.json file. /Users/harbs/Documents/ApacheRoyale/royale-asjs/frameworks/projects/Testing/asconfig.json
[ { path: '', keyword: 'oneOf' } ]
Removing the "lib" option or changing it to "app", makes the error go away.
Err, that one's only in VS-Code, isn't it?
Moved from BowlerHatLLC/vscode-as3mxml#17
Adobe AIR: ADT package command
Some examples of how the command line options will work appear below.
iOS release package:
asconfigc --sdk path/to/sdk --air ios
Android debug package:
asconfigc --sdk path/to/sdk --air android --debug
Desktop package:
asconfigc --sdk path/to/sdk --air
Moved from BowlerHatLLC/vscode-as3mxml#17
Hey, there has been sometime I've not been using asconfigc
. I don't know why I'm getting:
a target file must be specified.
Any idea? This is my asconfig.json
:
{
"config": "air",
"type": "app",
"mainClass": "Main",
"compilerOptions": {
"source-path": ["src"],
"library-path": ["libs"],
"output": "build/phantasy-star-3.swf"
}
}
I did try adding compilerOptions.targets = ['SWF']
, but still nothing.
Currently string constants are not generated properly, which will lead to the compilation error:
col: 95 Error: The initializer for a configuration value must be a compile time constant.
in asconfig:
"define": [
{ "name": "CONFIG::DEBUG_NS", "value": "*" }
]
generated line:
--define+=CONFIG::DEBUG_NS,*
Double or single quote have to be used(1), what it should look like:
--define+=CONFIG::DEBUG_NS,"*"
even using additionalOptions will trim double quote and single quote out:
"additionalOptions": "--define+=CONFIG::DEBUG_NS,\"*\""
(1) "Using conditional compilation" in https://help.adobe.com/archive/en_US/flex/using/flex_4.6_help.pdf
Watch source-path, library-path, external-library-path and asconfig.json for changes and rebuild.
Probably using this package: https://www.npmjs.com/package/chokidar
EDIT: Royale's compiler natively supports a --watch
compiler option. It is supported with asconfigc's --watch
option since asconfigc 1.6.0. See commit a3209fd. Other compilers will require a custom solution.
When running asconfigc, I'm seeing a lot of extra line returns which causes the results to scroll up off the screen.
BowlerHatLLC/vscode-as3mxml#109
I have separated embedded and non-embedded assets in my project, so that I can avoid embedded assets being copied to the release build. I don't want to enable copySourcePathAssets as there are a lot of assets I don't want copied over.
Please see this basic project example, which exhibits the issue: https://www.dropbox.com/s/0q1ny9os8y3x2tm/asconfigc%20Files%20Issue.zip?dl=0
In bin-release, the folder is correctly copied to assets/images/, but in bin-debug it's copied to images/ - the assets parent folder is somehow ignored.
Currently, it only accepts the path to a directory, but a JSON file should be allowed too, and it shouldn't be required to be named asconfig.json.
The TypeScript compiler has also been updated to support both too.
Hi Josh,
probably it's obvious for some people but I think it is worth to mention in the readme that asconfigc itself is transpiled to JS/Node by using Falcon and also captures packages like jsen and minimist.
So this is a real world example for an awesome working AS3/JS app! ;-)
Although I spend some time with FlexJS it took some time until I noticed that *lol
Thanks,
Olaf
Can I just say first Josh thanks very much for all the great work here...
I am working on an air-mobile project that I am trying to port to FlexJS (using 0.8.0 - I will switch to Royale when its official). I was getting a failure when trying to build, is seems that there is call to fwritesync after compiling the FlexJS output, that wants to make a copy of the AIR descriptor xml file, but is pointing to a bin/bin/js-debug and not bin/js-debug and that causes a crash in the build:
Error: ENOENT: no such file or directory, open '/Volumes/LocalData/Users/mick/flex-projects/MobileStocks/MobileStocks/bin/bin/js-debug/MobileStocks-app.xml'
at Object.fs.openSync (fs.js:663:18)
at Object.fs.writeFileSync (fs.js:1314:33)
It may well be due to my setup, and I have been trying to follow your instructions and use the sample MobileStocks app rather than my own as a test, but I still get the same error. I made a folder called MobileStocks and then copied the MobileStocks example into that. My workaround is just to copy the air descriptor xml file into a bin/js-debug folder in the bin folder.
My asconfig.json is:
{
"config": "airmobile",
"compilerOptions": {
"output": "MobileStocks/bin/MobileStocks.swf"
},
"application": "MobileStocks/MobileStocks-app.xml",
"files":
[
"MobileStocks/src/main/flex/MobileStocks.mxml"
]
}
tasks.json is:
{
"version": "2.0.0",
"tasks": [
{
"identifier": "build-debug",
"type": "actionscript",
"debug": true,
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
See previous discussion in BowlerHatLLC/vscode-as3mxml#7
Should be a recent LTS release. Probably Node 6 or newer.
Right now, if someone tries to use an older version of Node, it will fail without a clear reason why.
A few little issues with building via Animate:
Hi Josh,
link here in "ActionScript and MXML extension for Visual Studio Code," seems to be outdated: https://github.com/BowlerHatLLC/asconfigc/wiki
Ran into an issue where embedding fonts into a swc failed because the JVM ran out of memory.
Solution:
asconfigc.cmd '--sdk', 'c:\airsdk\32.0.0.116', '--debug=false', '--project', '.\font\asconfig.embed-fonts.json' '--jvmargs=-Xmx1000m'
Couldn't figure out any other way to do it other than calling this manually. Would be awesome to have either the default maximum of the JVM just increased, since it doesn't matter, or adding a configurable option to increase it.
Thanks!
Can we have an -output switch so that it ignores the one from asconfig.json and uses this instead?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.