-
Notifications
You must be signed in to change notification settings - Fork 0
/
fractal.config.js
executable file
·62 lines (52 loc) · 1.66 KB
/
fractal.config.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
const path = require('path');
const fractal = (module.exports = require('@frctl/fractal').create());
const pkg = require(path.join(__dirname, 'package.json'));
/*-------------------------------------------------------*\
Feel free to adapt Fractal config below to your needs
\*-------------------------------------------------------*/
/**
* Metadata
*/
fractal.set('project.title', 'Geocity styleguide');
// Provide the package.json "version" to the templates
fractal.set('project.version', pkg.version);
/**
* Files location
*/
fractal.components.set('path', path.join(__dirname, 'components'));
fractal.docs.set('path', path.join(__dirname, 'docs'));
fractal.web.set('static.path', path.join(__dirname, 'public'));
/**
* Build options
*/
// If you change the build destination, you should adapt webpack.common.js "output.path" too.
fractal.web.set('builder.dest', 'dist');
/**
* Templating
*/
// Use Nunjucks as the template engine
fractal.components.engine('@frctl/nunjucks');
fractal.docs.engine('@frctl/nunjucks');
// Look for templates with a ".nunj" extension
fractal.components.set('ext', '.nunj');
/**
* Custom theme
*/
const piagetTheme = require('./theme');
fractal.web.theme(piagetTheme);
/*----------------------------------------*\
Change the following at your own risk
\*----------------------------------------*/
/**
* Server configuration
*/
fractal.web.set('server.port', 4000);
fractal.web.set('server.sync', true);
/**
* Prevent Bluebird warnings like "a promise was created in a handler but was not returned from it"
* caused by Nunjucks from polluting the console
*/
const bluebird = require('bluebird');
bluebird.config({
warnings: false,
});