bower-json-0.4.0.0: bower.json from Haskell

Safe HaskellNone
LanguageHaskell2010

Web.BowerJson

Description

A data type representing the Bower.json package description file, together with a parser and related functions.

This code is based on the specification at https://github.com/bower/bower.json-spec.

Synopsis

Documentation

data BowerJson Source

A data type representing the data stored in a bower.json package manifest file.

Note that the ToJSON / FromJSON instances don't exactly match; for example, it is not always the case that decoding from JSON and then encoding to JSON will give you the exact same JSON that you started with. However, if you start with a BowerJson value, encode to JSON, and then decode, you should always get the same value back.

decodeFile :: FilePath -> IO (Either String BowerJson) Source

Read and attempt to decode a bower.json file.

data PackageName Source

A valid package name for a Bower package.

mkPackageName :: String -> Maybe PackageName Source

A smart constructor for a PackageName. It ensures that the package name satisfies the restrictions described at https://github.com/bower/bower.json-spec#name.