-
Notifications
You must be signed in to change notification settings - Fork 31
/
config.js
41 lines (41 loc) · 1.97 KB
/
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
module.exports = {
port: 8080,
mediaTypes: ['images', 'audios', 'videos'],
folders: {
assets: 'assets',
libraries: 'libraries',
temp: 'temp'
},
files: {
watch: true,
watchExclusions: [/node_modules\//],
patterns: {
allowed: /\.(json|png|jpg|jpeg|gif|bmp|tif|tiff|eot|ttf|woff|woff2|otf|webm|mp4|ogg|mp3|m4a|wav|txt|pdf|rtf|doc|docx|xls|xlsx|ppt|pptx|odt|ods|odp|csv|diff|patch|swf|md|textile|vtt|webvtt|gltf|glb|js|css|svg|xml)$/,
ignored: /^\.|~$/gi
}
},
urls: {
registry: 'https://raw.githubusercontent.com/h5p/h5p-registry/main/libraries.json',
library: {
language: 'https://raw.githubusercontent.com/{org}/{dep}/{version}/language/en.json',
semantics: 'https://raw.githubusercontent.com/{org}/{dep}/{version}/semantics.json',
list: 'https://raw.githubusercontent.com/{org}/{dep}/{version}/library.json',
clone: 'https://github.com/{org}/{repo}.git',
sshClone: '[email protected]:{org}/{repo}.git',
zip: 'https://github.com/{org}/{repo}/archive/refs/heads/{version}.zip'
}
},
core: {
clone: ['h5p-editor-php-library', 'h5p-php-library'],
setup: ['h5p-math-display']
},
registry: 'libraryRegistry.json',
saveFreq: 30
}
if (process.argv[3] && process.argv[2] === 'server') {
module.exports.port = +process.argv[3];
}
module.exports.api = `http://localhost:${module.exports.port}`; // change this if you want to expose the server to the internet
// files.patterns.allowed & files.patterns.ignored are used in the export logic to determine which files are allowed/ignored in the .h5p zip archive
module.exports.files.patterns.allowed = process.env.h5p_cli_allowed_files ? new RegExp(process.env.h5p_cli_allowed_files, process.env.h5p_cli_allowed_modifiers) : module.exports.files.patterns.allowed;
module.exports.files.patterns.ignored = process.env.h5p_cli_ignored_files ? new RegExp(process.env.h5p_cli_ignored_files, process.env.h5p_cli_ignored_modifiers) : module.exports.files.patterns.ignored;