fastlane / fastfile-parser

Convert the Fastfile to a JSON file
https://fastlane.tools
MIT License
7 stars 5 forks source link

FastfileParser should implement a `.to_json` method. #8

Open minuscorp opened 6 years ago

minuscorp commented 6 years ago

Title says it all.

KrauseFx commented 6 years ago

What for? :)

minuscorp commented 6 years ago

So for peeking Fastfile configurations to the front-end, now I have to generate a custom json from the FastfileParser (such as sanitizing lanes with no platform, or functions being declared out of platform scope, pure ruby methods, etc). And pass it to the front end.

KrauseFx commented 6 years ago

Wouldn't parser.all_lanes_flat.to_json be enough?

minuscorp commented 6 years ago

Except from when the platform is nil, that should've replaced for some recognizable key (for now I'm using :no_platform when platform is nil. all_lanes_flat seems to be able to ignore actions out of a platform scope, but I don't know if that's something it should be like that (are we allowing to run lanes out of platform in CI?)