2015-11-26 07:32:55 -08:00
|
|
|
---
|
|
|
|
# Template definitions for goodies.
|
|
|
|
|
|
|
|
# Each template represents one input and one output file.
|
|
|
|
# Modification of files generated by certain templates will need to restart a
|
|
|
|
# running duckpan instance in order to be recognized:
|
|
|
|
# - Perl modules
|
|
|
|
# - Cheat Sheet JSON, since they are pre-loaded
|
|
|
|
# This is indicated by the 'needs_restart' field.
|
|
|
|
templates:
|
|
|
|
pm:
|
|
|
|
label: Perl Module
|
|
|
|
input: lib/DDG/Goodie/Example.pm
|
|
|
|
output: lib/DDG/Goodie/<:$ia_path:>.pm
|
|
|
|
needs_restart: true
|
|
|
|
|
|
|
|
test:
|
|
|
|
label: Perl Module Test
|
|
|
|
input: t/Example.t
|
|
|
|
output: t/<:$ia_path:>.t
|
|
|
|
|
|
|
|
js:
|
|
|
|
label: Javascript
|
|
|
|
input: share/goodie/example/example.js
|
|
|
|
output: share/goodie/<:$ia_path_lc:>/<:$ia_id:>.js
|
|
|
|
|
|
|
|
css:
|
|
|
|
label: CSS
|
|
|
|
input: share/goodie/example/example.css
|
|
|
|
output: share/goodie/<:$ia_path_lc:>/<:$ia_id:>.css
|
|
|
|
|
2015-12-10 07:51:40 -08:00
|
|
|
handlebars:
|
|
|
|
label: Handlebars
|
|
|
|
input: share/goodie/example/example.handlebars
|
|
|
|
output: share/goodie/<:$ia_path_lc:>/<:$ia_id:>.handlebars
|
|
|
|
|
2015-11-26 07:32:55 -08:00
|
|
|
cheatsheet_json:
|
|
|
|
label: CheatSheet JSON
|
|
|
|
input: share/goodie/cheat_sheets/json/example.json
|
|
|
|
output: share/goodie/cheat_sheets/json/<:$ia_id:>.json
|
|
|
|
needs_restart: true
|
|
|
|
|
|
|
|
# A template set is a collection of templates used to generate all files of a
|
|
|
|
# sub-type of an Instant Answer type. Each set can have some 'required'
|
|
|
|
# templates (which are always applied) and some 'optional' templates (which are
|
|
|
|
# applied after asking the user).
|
|
|
|
template_sets:
|
|
|
|
default:
|
|
|
|
description: Standard Goodie Instant Answer
|
|
|
|
required: [ pm, test ]
|
2015-12-10 07:51:40 -08:00
|
|
|
optional: [ js, css, handlebars ]
|
2015-11-26 07:32:55 -08:00
|
|
|
|
|
|
|
cheatsheet:
|
|
|
|
description: Cheat Sheet Instant Answer
|
|
|
|
required: [ cheatsheet_json ]
|
|
|
|
|
|
|
|
all:
|
|
|
|
description: Goodie with all backend and frontend files
|
2015-12-10 07:51:40 -08:00
|
|
|
required: [ pm, test, js, css, handlebars ]
|
2015-11-26 07:32:55 -08:00
|
|
|
...
|
|
|
|
|