-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
24 lines (22 loc) · 812 Bytes
/
index.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
const { resolve } = require('path')
module.exports = (opts, ctx) => ({
define() {
const { musicList, containerBg, themeColor, musicInfoBg, titleColor, zoom, bottom, zIndex } = opts
if (!musicList || !Array.isArray(musicList)) return console.error('@noxone/vuepress-plugin-music-player:', 'musicList is needed!')
const CONTAINER = {
containerBg: containerBg || '#fff',
themeColor: themeColor || '#0cdae9',
musicInfoBg: musicInfoBg || 'rgba(255, 255, 255, 0.5)',
musicTitleColor: titleColor || '#000',
zoom: zoom || 0.7,
bottom: bottom || '50px',
zIndex: zIndex || 1
}
return {
CONTAINER,
MUSIC_LIST:musicList
}
},
enhanceAppFiles: resolve(__dirname, './bin/enhanceAppFile.js'),
globalUIComponents: 'MusicPlayer'
})