Module

Web.Bower.PackageMeta

Package
purescript-bower-json
Repository
klntsky/purescript-bower-json

Decoders for various types representing bower.json contents.

The main type is PackageMeta.

BowerJson represents a valid bower.json file (literally).

The spec: https://github.com/bower/spec/blob/master/json.md

#PackageMeta Source

newtype PackageMeta

A human-friendly version of BowerJson.

Decoding to and encoding from this type does not preserve fields with default values.

For example, encoding a PackageMeta with license: [] and private: false will result in a json object without these fields.

Use BowerJson if these omissions are not desirable.

Constructors

Instances

#Author Source

newtype Author

If an author is specified as a String, e.g.:

"author": "Author Name <author@gmail.com>",

this string will not be parsed, and this entry will be decoded as

Author { name: Just "Author Name <author@gmail.com>"
       , email: Nothing
       , homepage: Nothing }

Constructors

Instances

#BowerJson Source

newtype BowerJson

A bower.json file represented as it is. Decoding and encoding a bower.json to and from BowerJson does not change it (up to JSON reformatting).

BowerJson type should only be used when the above property is needed.

For other use cases, it is more convenient to use PackageMeta instead.

Constructors

Instances