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 PackageMetaA 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
PackageMeta { authors :: Array Author, dependencies :: Dependencies, description :: Maybe String, devDependencies :: Dependencies, homepage :: Maybe String, ignore :: Array String, keywords :: Array String, license :: Array String, main :: Array String, moduleType :: Array ModuleType, name :: String, private :: Boolean, repository :: Maybe { type :: String, url :: String }, resolutions :: Resolutions }
Instances
#Dependencies Source
newtype DependenciesConstructors
Dependencies (Array { packageName :: String, versionRange :: String })
Instances
#Resolutions Source
newtype ResolutionsConstructors
Resolutions (Array { packageName :: String, version :: String })
Instances
#ModuleType Source
#Author Source
newtype AuthorIf 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 BowerJsonA 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
BowerJson { authors :: Maybe (Array Author), dependencies :: Maybe Dependencies, description :: Maybe String, devDependencies :: Maybe Dependencies, homepage :: Maybe String, ignore :: Maybe (Array String), keywords :: Maybe (Array String), license :: Maybe (Array String), main :: Maybe (Array String), moduleType :: Maybe (Array ModuleType), name :: String, private :: Maybe Boolean, repository :: Maybe { type :: String, url :: String }, resolutions :: Maybe Resolutions }
Instances
- Modules
- Web.
Bower. PackageMeta