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

Example. Drupal library declaration #365

Closed
dcorb opened this issue Nov 5, 2015 · 1 comment
Closed

Example. Drupal library declaration #365

dcorb opened this issue Nov 5, 2015 · 1 comment

Comments

@dcorb
Copy link

dcorb commented Nov 5, 2015

This is a support request.

We are evaluating to use TOML in Drupal as an optional alternative to YAML for declaring structure of data, for example libraries.yml files

https://www.drupal.org/node/2422141

I got quite confused with the use of "."s but after reading this recent PR, I understood better #283

Is this an equivalent declaration ?
YAML

backbone:
  remote: https://github.com/jashkenas/backbone
  version: "1.2.3"
  license:
    name: MIT
    url: https://github.com/jashkenas/backbone/blob/1.2.3/LICENSE
    gpl-compatible: true
  js:
    assets/vendor/backbone/backbone-min.js: { weight: -19, minified: true }
  dependencies:
    - core/underscore

Is this the simplest way to write it as TOML? How can I add "backbone.dependencies" to keep the same order as YAML ?

TOML.

[backbone]
  remote = "https://github.com/jashkenas/backbone"
  version = "1.2.3"
  dependencies = ["core/underscore"]

  [backbone.license]
  name = "MIT"
  url = "https://github.com/jashkenas/backbone/blob/1.2.3/LICENSE"
  gpl-compatible = true

  [backbone.js."assets/vendor/backbone/backbone-min.js"] 
  minified = true
  weight = -19
@mojombo
Copy link
Member

mojombo commented Nov 6, 2015

Yes, those two documents should map to the same hash table!

@mojombo mojombo closed this as completed Jan 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants