-
Notifications
You must be signed in to change notification settings - Fork 1
/
slm.js
66 lines (62 loc) · 1.39 KB
/
slm.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
/**
* Dependencies
*/
const path = require('path');
const resolve = require(path.join(__dirname, '../', 'bin/util/resolve'));
const package = resolve('package.json');
const global = resolve('config/global');
const tokens = resolve('config/tokens');
/**
* Config
*
* @type {Object}
*/
module.exports = {
/**
* Options to pass to the marked package
*
* @type {Source} https://marked.js.org/#/USING_ADVANCED.md#options
*/
marked: {
gfm: true,
headerIds: true,
headerPrefix: '',
smartypants: true
},
/**
* Options to pass to the JS Beautify package for formatting html
*
* @type {Source} https://github.com/beautify-web/js-beautify
*/
beautify: {
indent_size: 2,
indent_char: ' ',
preserve_newlines: false,
indent_inner_html: false,
inline: [],
wrap_line_length: 0,
indent_inner_html: false
},
/**
* The following objects are locals passed to the slm view render and
* are accessed via control codes. For example, in a .slm template;
*
* h1 - this.package.name
*
* will render
*
* <h1>@nycopportunity/patterns-framework</h1>
*
* NOTE Functions can also be passed to the slm view render.
*
* @type {Source} https://github.com/slm-lang/slm#user-content-control-code--
*/
package: package,
global: global,
tokens: tokens,
process: {
env: {
NODE_ENV: process.env.NODE_ENV
}
}
};