This repository shows how to use Mozaïk with npm extensions.
git clone git@github.com:plouc/mozaik-demo.gitcd mozaik-demo
yarn installyarn buildnode server.jsThis repo provides several config files targeting specific extensions demo, to run another demo, simply pass the config file as first argument:
node server.js config-github.ymlJust search for config-*.yml files to see what's available.
Several themes are loaded from
mozaik-themes
package, you can change the default theme used by
updating this line in src/index.js:
// src/index.js
ThemeManager.defaultTheme = wine.nameSome extensions requires additional settings, you
can add it via environment variables to avoid
modifying config files, you can use export:
export GITHUB_API_TOKEN="xxxxx"
node server.js config-github.ymlor prepend it to the command:
GITHUB_API_TOKEN="xxxxx" node server.js config-github.ymlor create an .env file if you want a more permanent solution:
# .env
GITHUB_API_TOKEN=xxxxx
node server.js config-github.ymlNote that .env file is in .gitignore to prevent pushing
sensible data to GitHub.