Repository navigation
Expand file tree
/
Copy pathfractal.js
More file actions
59 lines (46 loc) · 1.79 KB
/
Copy pathfractal.js
File metadata and controls
59 lines (46 loc) · 1.79 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
'use strict';
const path = require('path');
const fractal = module.exports = require('@frctl/fractal').create();
const mandelbrot = require('@frctl/mandelbrot');
// create a new instance with custom config options
const ralTheme = mandelbrot({
"skin": "black",
"nav": ["docs", "components"],
"panels": ["html", "notes", "resources", "info", "view", "context", ]
// any other theme configuration values here
// http://fractal.build/guide/customisation/web-themes
});
// tell Fractal to use the configured theme by default
fractal.web.theme(ralTheme);
const hbs = require('@frctl/handlebars')({
helpers: {
getCssClasses: function(css) {
var cssClass;
var modifierClass = css.base + '--' + css.modifier;
if (css.modifier !== undefined) {
cssClass = css.base + ' ' + modifierClass;
} else {
cssClass = css.base
}
return cssClass;
},
uppercase: function(str) {
return str.toUpperCase();
}
}
/* other configuration options here */
});
// Tell Fractal to use the custom theme engine
fractal.components.engine(hbs);
// Give your project a title.
fractal.set('project.title', 'Strongback CSS Components');
// Tell Fractal where to look for components.
fractal.components.set('path', path.join(__dirname, 'library'));
// Tell Fractal where to look for documentation pages.
fractal.docs.set('path', path.join(__dirname, 'docs'));
// Tell the Fractal web preview plugin where to look for static assets.
fractal.web.set('static.path', path.join(__dirname, 'public'));
// Set the static HTML build destination
fractal.web.set('builder.dest', __dirname + '/site');
// Set default preview template
fractal.components.set('default.preview', '@preview');