doc/plugins.md in power_stencil-0.5.0 vs doc/plugins.md in power_stencil-0.5.1

- old
+ new

@@ -95,11 +95,11 @@ --> Plugin 'myplugin' has following capabilities: - config: true - command_line: true - processors: true - build: true - - dsl: false + - dsl: true - entity_definitions: true - templates: true ``` Each of the lines correspond to what is called a _plugin capability_. @@ -121,11 +121,11 @@ - myplugin (in '/tmp/demo/.ps_project/plugins/myplugin/lib/myplugin.rb') config: true command_line: true processors: true build: true - dsl: false + dsl: true entity_definitions: true templates: true ``` ## Adding new subcommands to `PowerStencil` @@ -334,11 +334,12 @@ # This is the name of the method called after the files are detemplatized. This method has # to be a module method in the `plugin_module` module. :build: post_build_hook # If a dsl module is declared it will be injected in the DSL available in the shell or templates -:dsl: null +:dsl: + - Myplugin::Dsl::MypluginDsl # These are the files (array) defining entity types. These files should not be already # required by the plugin as they will be required by the framework when needed. :entity_definitions: - myplugin/entity_definitions/myplugin_entity @@ -347,12 +348,16 @@ # entity types they are attached to. :templates: - etc/templates ``` -As it is quite self-documented, I won't too much elaborate on the meaning of each of the fields. But actually a plugin can actually provide ... nothing. +As it is quite self-documented, I won't too much elaborate on the meaning of each of the fields. +So you see that the plugin generated by the `power_stencil plugin --create` command is actually fully featured, providing all possible extras, in order to demonstrate the possibilities as well as ease your job, as you just have to fill the blanks or remove things you don't wan't.create + +But a plugin could also actually provide ... nothing. + Let's create a plugin fully manually instead of using the `power_stencil plugin --create`. From the root of the project, let's create the directory: $ mkdir -p .ps_project/plugins/minimal/etc (of course the command to create the directory may be different on your system). Then here let's create a `plugin_capabilities.yaml` file with the following content: @@ -373,10 +378,10 @@ --> Plugin 'minimal' has following capabilities: - config: false - command_line: false - processors: false - build: false - - dsl: false + - dsl: true - entity_definitions: false - templates: false ``` All the code you may write has to be within the `lib` subdirectory, so let's create it: \ No newline at end of file