Feature Request: JSON for command line compiler

Instead of dealing with somewhat cumbersome command-line options it could be more user friendly to allow a text file with a JSON object to configure the compiler!

JSON can be regarded as kind of de facto standard for configs & co so Kotlin could take the bill.


kotlinc-js.bat -version -target v5 -meta-info -sorce-map -source-map-embed-sources always -output ./js/xyz.js @files.list


“version”: true,
“target”: “v5”,
“metainfo”: true,
“sourcemap”: true,
“embedmap”: “always”,
“output”: “./js/xyz.js”,
“input”: [

kotlinc-js.bat config.json

Any particular reason to not use gradle (or another build system)? In general things very quickly get way too complex to do the compilation by hand.

1 Like

Any reason not to use the command line compiler?
If there is one, and has switches, why not make this more useable?

A large project without build tool is hard to develop and unmaintainable in general. You can do it for your own pleasure, but do not expect your command-line code to be used or supported by anyone.

1 Like

if there is a command line compiler why not use different switch mechanism?
What is the reason not to do this?
Please specify large project

One can write the code to take a json file and invoke the compiler with the options specified in the json file.
That is easy enough that the compiler shouldn’t need to support that independently.

1 Like