Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for YAML config? #781

Open
JoakimSoderberg opened this issue Nov 2, 2017 · 3 comments
Open

Support for YAML config? #781

JoakimSoderberg opened this issue Nov 2, 2017 · 3 comments

Comments

@JoakimSoderberg
Copy link

I'm submitting a feature request

  • Loader/bundler:
    aurelia

Current behavior:
A JSON file is used as config for the aurelia-cli

  • What is the expected behavior?
    A pleasant config editing experience

  • What is the motivation / use case for changing the behavior?
    Being happy!

Currently bundle configuration goes into aurelia.json. It's very common one has to edit this file manually.

The problem with using JSON for such a config, with a bunch of settings that are non-obvious, is that JSON does not support any type of comments.

In many other config formats it's common to have comments explaining the different settings. Also it's at times extremely useful to be able to comment on "hacks" that had to be done for some random dependency.

JSON is a subset of YAML. So how about using YAML of this config instead, to make the editing experience a bit more pleasurable?

I guess one issue will be the tools that automatically edit this file and add dependencies when running au install. But from my experience, that never works properly anyway? #530

I would rather have a nice useful help text in the config file that explains where to add what. Thoughts?

@JeroenVinke
Copy link
Collaborator

Thanks for opening the feature request. It's certainly worth considering. @AStoker what are your thoughts?

@firelizzard18
Copy link

I would love this. It would be easy to implement using js-yaml from NPM. Perhaps a question in au new? Or just make the user add it. "You can use aurelia.yaml instead of aurelia.json, but you have to manually npm install -D js-yaml." Or have the CLI automatically install js-yaml if it detects a YAML config.

Technically, you don't actually need any conditional logic, if you're willing to add js-yaml to the CLI's dependencies. YAML is a strict superset of JSON, so any valid JSON is also valid YAML.

@k-j-kleist
Copy link

YAML rocks! which I firmly believe is one of the reasons for the popularity of Ansible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants