xpulse.json Schema
Required Fields
| Key |
Type |
Description |
name |
string |
Unique project name, e.g. xpulse-chat |
Standard Keys with Defaults
| Key |
Type |
Default |
type |
string |
'tool' |
theme.default |
string |
'dark' |
i18n.default |
string |
'de' |
i18n.locales |
string[] |
['de'] |
paths.pages |
string |
'pages/' |
paths.templates |
string |
'templates/' |
paths.locales |
string |
'locales/' |
paths.public |
string |
'public/' |
http.port |
string |
process.env.PORT || '3000' |
Full Example
| 1 | { |
| 2 | "name": "xpulse-web", |
| 3 | "type": "tool", |
| 4 | |
| 5 | "http": { |
| 6 | "port": "${PORT}" |
| 7 | }, |
| 8 | |
| 9 | "theme": { |
| 10 | "default": "platform" |
| 11 | }, |
| 12 | |
| 13 | "i18n": { |
| 14 | "default": "de", |
| 15 | "locales": ["de", "en"] |
| 16 | }, |
| 17 | |
| 18 | "paths": { |
| 19 | "pages": "pages/", |
| 20 | "templates": "templates/", |
| 21 | "locales": "locales/", |
| 22 | "public": "public/" |
| 23 | }, |
| 24 | |
| 25 | "sources": { |
| 26 | "chat": { |
| 27 | "name": "xPulse Chat", |
| 28 | "url": "${CHAT_URL}", |
| 29 | "repo": "https://bitbucket.org/xpulse1/xpulse-chat.git", |
| 30 | "type": "tool", |
| 31 | "docs": true |
| 32 | } |
| 33 | } |
| 34 | } |
Custom Keys
Unknown keys are ignored and passed through without warnings.
They are accessible via config.get():
| 1 | { |
| 2 | "name": "xpulse-chat", |
| 3 | "release": { |
| 4 | "current": "1.3.0", |
| 5 | "codename": "Abomasnow" |
| 6 | } |
| 7 | } |
| 1 | config.get('release.current') |
| 2 | config.get('release.codename') |
Convention: custom keys should be named clearly to avoid conflicts
with future standard keys.
Minimal Example (Component)
| 1 | { |
| 2 | "name": "xpulse-config", |
| 3 | "type": "component" |
| 4 | } |