forked from Kishanjay/LacunaV2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_settings.js
More file actions
61 lines (50 loc) · 1.63 KB
/
Copy path_settings.js
File metadata and controls
61 lines (50 loc) · 1.63 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
60
61
module.exports = {
/**
* Where the analyzers are stored, relative to Lacuna
*/
ANALYZERS_DIR: "analyzers",
ANALYZER_TIMEOUT: 600000, // miliseconds
/**
* The output dir of Lacuna files, relative to the destination.
* NOTE that this directory will be removed/cleared on every run of Lacuna
*/
LACUNA_OUTPUT_DIR: "lacuna_cache",
/**
* Supported optimization levels
*/
OPTIMIZATION_LEVELS: [
0, // do not replace anything, leaves source-code intact
1, // replace functions with lazy loading mechanism
2, // replace functions with empty functions
3, // replace functions with null
],
/**
* Wether Lacuna should also parse the externally hosted JS files
* For this the file will be downloaded and stored locally.
* The references in the HTML files will be updated and the local file will
* be optimized where needed.
*/
IMPORT_EXTERNALLY_HOSTED_SCRIPTS: true,
/**
* Wether Lacuna should export the inline JS to its own file
* generally this is a better coding practise
*
* NOTE: currently always does this (cannot disable)
*/
EXPORT_INLINE_SCRIPTS: true,
/**
*
*/
EXPORT_EVENT_ATTRIBUTES: true,
EVENT_ATTRIBUTES_FILENAME: 'eventAttributes.js',
/**
* The server port where the lazy load server will be hosted on
*/
LAZY_LOAD_SERVER_PORT: 8125,
/**
* Converts functionData to a unique function ID
*/
functionDataToId(functionData) {
return `${functionData.file}[${functionData.bodyRange[0]}:${functionData.bodyRange[1]}]`;
},
}