PkgTemplates.jl/dev/search_index.js

4 lines
59 KiB
JavaScript
Raw Normal View History

2019-11-12 13:41:12 +00:00
var documenterSearchIndex = {"docs":
2019-12-17 09:22:44 +00:00
[{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"CurrentModule = PkgTemplates","category":"page"},{"location":"developer/#PkgTemplates-Developer-Guide-1","page":"Developer Guide","title":"PkgTemplates Developer Guide","text":"","category":"section"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"Pages = [\"developer.md\"]","category":"page"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"PkgTemplates can be easily extended by adding new Plugins.","category":"page"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"There are two types of plugins: Plugin and BasicPlugin.","category":"page"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"Plugin\nBasicPlugin","category":"page"},{"location":"developer/#PkgTemplates.Plugin","page":"Developer Guide","title":"PkgTemplates.Plugin","text":"Plugins are PkgTemplates' source of customization and extensibility. Add plugins to your Templates to enable extra pieces of repository setup.\n\nWhen implementing a new plugin, subtype this type to have full control over its behaviour.\n\n\n\n\n\n","category":"type"},{"location":"developer/#PkgTemplates.BasicPlugin","page":"Developer Guide","title":"PkgTemplates.BasicPlugin","text":"A simple plugin that, in general, creates a single file.\n\n\n\n\n\n","category":"type"},{"location":"developer/#Template-Package-Creation-Pipeline-1","page":"Developer Guide","title":"Template + Package Creation Pipeline","text":"","category":"section"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"The Template constructor basically does this:","category":"page"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"- extract values from keyword arguments\n- create a Template from the values\n- for each plugin:\n - validate plugin against the template","category":"page"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"The plugin validation step uses the validate function. It lets us catch mistakes before we try to generate packages.","category":"page"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"validate","category":"page"},{"location":"developer/#PkgTemplates.validate","page":"Developer Guide","title":"PkgTemplates.validate","text":"validate(::Plugin, ::Template)\n\nPerform any required validation for a Plugin.\n\nIt is preferred to do validation here instead of in prehook, because this function is called at Template construction time, whereas the prehook is only run at package generation time.\n\n\n\n\n\n","category":"function"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"The package generation process looks like this:","category":"page"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"- create empty directory for the package\n- for each plugin, ordered by priority:\n - run plugin prehook\n- for each plugin, ordered by priority:\n - run plugin hook\n- for each plugin, ordered by priority:\n - run plugin posthook","category":"page"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"As you can tell, plugins play a central role in setting up a package.","category":"page"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"The three main entrypoints for plugins to do work are the prehook, the hook, and the posthook. As the names might imply, they basically mean \"before the main stage\", \"the main stage\", and \"after the main stage\", respectively.","category":"page"},{"location":"developer/#","page":"Developer Guide","title":"Developer Guide","text":"Each stage is basically identical, since the functions take the exact same arguments. However, the multiple stages allow us to depend on artifacts of the previous stages. For example, the Git plugin uses posthook to commit all generated file
2019-11-12 13:41:12 +00:00
}