/
index.js
45 lines (42 loc) · 1.45 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
var path = require('path')
// Export function to create new config (builder is passed in from outside)
module.exports = function (builder) {
var bootstrapLess = require.resolve('bootstrap/less/bootstrap.less')
return builder.merge({
handlebars: {
templates: path.resolve(__dirname, 'handlebars', 'templates'),
partials: path.resolve(__dirname, 'handlebars', 'partials'),
helpers: require.resolve('./handlebars/helpers.js'),
/**
* A preprocessor that may return a modified json before entering the rendering process.
* Access the inherited preprocessor is possible via <code>this.previous(json)</code>
* @param obj the input object
* @return a modified object or a promise for a modified object.
*/
preprocessor: function (obj) {
return obj
}
},
less: {
main: [
bootstrapLess,
require.resolve('highlight.js/styles/default.css'),
require.resolve('./less/main.less')
],
paths: [
path.dirname(bootstrapLess)
]
},
uglify: {
files: {
'bootprint-base/bootstrap.js': require.resolve('bootstrap/dist/js/bootstrap.js'),
'bootprint-base/jquery.js': require.resolve('jquery/dist/jquery.js')
},
dependencies: {
'bootprint-base/bootstrap.js': [ 'bootprint-base/jquery.js' ]
}
}
})
}
// Add "package" to be used by bootprint-doc-generator
module.exports.package = require('./package')