This repository shows how to use Mozaïk with npm extensions.
git clone [email protected]:plouc/mozaik-demo.git
cd mozaik-demo
yarn install
yarn build
node server.js
This 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.yml
Just 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.name
Some 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.yml
or prepend it to the command:
GITHUB_API_TOKEN="xxxxx" node server.js config-github.yml
or create an .env
file if you want a more permanent solution:
# .env
GITHUB_API_TOKEN=xxxxx
node server.js config-github.yml
Note that .env
file is in .gitignore
to prevent pushing
sensible data to GitHub.