forked from bootprint/bootprint-openapi
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
30 lines (28 loc) · 938 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var path = require('path')
/**
* Create a bootprint template-module that can be loaded via `Bootprint#load`:
*
* @name index
* @param {BootprintBuilder} builder the current bootprint builder
* @return {BootprintBuilder} a bootprint-builder containing the template and Less settings for `bootprint-swagger`
* @api public
*/
module.exports = function bootprintSwagger (builder) {
return builder
.load(require('bootprint-json-schema'))
.merge({
'handlebars': {
'partials': path.join(__dirname, 'handlebars/partials'),
'helpers': require.resolve('./handlebars/helpers.js'),
'preprocessor': require('./lib/preprocessor.js')
},
'less': {
'main': [
require.resolve('./less/theme.less'),
require.resolve('./less/variables.less')
]
}
})
}
// Add "package" to be used by bootprint-doc-generator
module.exports.package = require('./package')