Skip to content

A set of aliases for http://cakebuild.net to help with YAML Serialization.

License

Notifications You must be signed in to change notification settings

augustoproiete-forks/cake-contrib--Cake.Yaml

 
 

Repository files navigation

Cake.Yaml

A set of aliases for cakebuild.net to help with YAML Serialization.

License

You can easily reference Cake.Yaml directly in your build script via a Cake addin:

#addin nuget:?package=Cake.Yaml&version=6.0.0
#addin nuget:?package=YamlDotNet&version=12.3.1

NOTE: It's very important at this point in time to specify the YamlDotNet package and the version 12.3.1 for it.

Aliases

Please visit the Cake Documentation for a list of available aliases:

https://cakebuild.net/dsl/yaml

Naming conventions

Since version 5.0.0, Cake.Yaml supports naming conventions implemented in YamlDotNet. E.g.:

var settings = new SerializeYamlSettings
{
    NamingConvention = CamelCaseNamingConvention.Instance,
};

var serialized = SerializeYaml(someObject, settings);

YamlDotNet includes a number of naming conventions out of the box:

Naming convention class Description
CamelCaseNamingConvention Convert the string with underscores (this_is_a_test) or hyphens (this-is-a-test) to camel case (thisIsATest)
HyphenatedNamingConvention Convert the string from camelcase (thisIsATest) to a hyphenated (this-is-a-test) string
LowerCaseNamingConvention Convert the string with underscores (this_is_a_test) or hyphens (this-is-a-test) to lower case (thisisatest)
NullNamingConvention Performs no naming conversion
PascalCaseNamingConvention Convert the string with underscores (this_is_a_test) or hyphens (this-is-a-test) to pascal case (ThisIsATest)
UnderscoredNamingConvention Convert the string from camelcase (thisIsATest) to a underscored (this_is_a_test) string

You can implement your own naming convention by creating a class that implements the INamingConvention interface.

Discussion

For questions and to discuss ideas & feature requests, use the GitHub discussions on the Cake GitHub repository, under the Extension Q&A category.

Join in the discussion on the Cake repository

About

A set of aliases for http://cakebuild.net to help with YAML Serialization.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 97.6%
  • PowerShell 1.4%
  • Shell 1.0%