Spliting the project config and misc tricks #69
j3k0
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For feeding future thoughts...
In my project I've decided to split the
project.apm
file into 2 different files:project/dependencies.json
contains{"dependencies": [...], "repositories": [...]}
project/configuration.json
contains{"identifier":"<id>", "version": "1.0.0", "configuration": [...]}
(basically all the rest).The reason is that this allows my build chain to only call
apm install
whenproject/dependencies.json
is more recent than the content ofapm_packages
.project.apm
is generated by doingcat project/*.json | jq -s '.[0] * .[1]' > project.apm
This isn't built-in
apm
so to install a dependency I manually edit thedependencies.json
file. I actually don't mind, editing JSON is totally fine with me.An idea for
apm
to support this use case natively would be to allow using multipleproject.apm
files:For example:
apm
-project project/dependencies.json
install
apm
-project project/configuration.json
project config
apm
-project project/configuration.json
-project project/dependencies.json
generate app-descriptor
Another trick I use is to generate a
src/Version.as
file fromproject/configuration.json
:This way I can show the users the version of the app they use in the corner of the screen.
Maybe would be a useful generator to add to
apm
in the future?For reference, relevant parts of the
Makefile
:Beta Was this translation helpful? Give feedback.
All reactions