This repository has been archived by the owner on Dec 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfractal.js
97 lines (83 loc) · 3.12 KB
/
fractal.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
'use strict';
const fractal = module.exports = require('@frctl/fractal').create();
const mandelbrot = require('@frctl/mandelbrot');
const customTheme = mandelbrot({
skin: 'blue',
styles: [
'default',
'/assets/css/marigold.css'
]
});
const sass = require('./lib/sass');
// XXX detect the CLI command
const command = process.argv[2];
const src = __dirname + '/src';
fractal.set('project.title', 'Marigold');
// use Nunjucks as the templating engine
fractal.components.engine(require('@frctl/nunjucks')({
filters: require('./lib/template-filters')
}));
fractal.components.set('ext', '.njk');
fractal.components.set('path', src + '/components');
fractal.components.set('default.preview', '@base');
fractal.components.set('default.status', 'hypothesis');
fractal.components.set('statuses', {
hypothesis: {
label: "Hypothesis",
description: "User need has been identified, but the approach to solving the problem has not yet been decided. Team has decided to tackle this UI pattern. The pattern has been listed in the public roadmap.",
color: "#e31c3d"
},
proposed: {
label: "Proposed",
description: "Identifies what user need the pattern solves. Lists alternative patterns that support this user need. Includes a rendering of the design. Describes any primary or secondary research that supports this pattern",
color: "#fdb81e"
},
alpha: {
label: "Alpha",
description: "The pattern has passed all heuristic assessments. No secondary research that would explicitly reject the pattern has surfanced.",
color: "#02bfe7"
},
beta: {
label: "Beta",
description: "Pattern is generally usable, on multiple devices, for people with relatively “normal” digital literacy. Pattern works in multiple configurations with other components. First draft of documentation is written.",
color: "#205493"
},
recommended: {
label: "Recommended",
description: "Pattern is usable, on multiple devices, by people with multiple disabilities and pattern is documented including context of use rationale.",
color: "#2e8540"
},
deprecated: {
label: "Deprecated",
description: "Pattern has been removed from the pattern library, design stencils and marked deprecated in release notes.",
color: "#5b616b"
}
});
fractal.docs.set('path', src + '/docs');
fractal.docs.set('default.status', 'alpha');
fractal.docs.set('statuses', {
alpha: {
label: "Alpha",
description: "First draft of documentation is written.",
color: '#02bfe7'
},
beta: {
label: "Beta",
description: "Documentation has been reviewed and needs final evaluation before recommended.",
color: "#205493"
},
recommended: {
label: "Recommended",
description: "Documentation, including context of use rationale, is complete.",
color: "2e8540"
}
});
fractal.web.set('static.path', src + '/assets');
fractal.web.set('static.mount', 'assets');
fractal.web.set('builder.dest', __dirname + '/build');
if (command === 'build') {
sass.buildDirectory(src);
} else if (command === 'start') {
sass.watchDirectory(src);
}
fractal.web.theme(customTheme);