Skip to content

YMPlayer 4: Environment configuration

吟夢ちゃん edited this page May 28, 2017 · 1 revision

Environment configuration (Chinese Simplified)

YMPlayer 4 采用 Webpack 构建,因此要求您本地拥有 node.js 环境。推荐您使用最新稳定版 node.js。

如果您是 Windows 用户,请直接前往 https://nodejs.org/ 下载对应系统环境的 node.js 安装 msi。如果您是 Linux / macOS 用户,请使用对应的包管理器安装 node.js 环境。

# for Arch Linux and other pacman series Linux
$ sudo pacman -S nodejs

# for Debian, Ubuntu and other apt-get series Linux
$ sudo apt-get install nodejs

# for CentOS, OpenSUSE, RedHat and other yum series Linux
$ sudo yum install -y nodejs

# for Fedora
$ sudo dnf install nodejs

# for macOS
$ brew install nodejs

接下来就是将 YMPlayer 的源代码克隆到本地并安装,可以通过 npm install ymplayer 或者通过 Git 两种方式来实现,请阅读 README.MD 的相关部分,这里不再赘述。

完成后,在 YMPlayer 的项目目录下,运行 npm run serve,即可运行 Webpack,同时系统会打开浏览器进入 webpack-dev-server 页面。

提示:如果不做修改,默认将打开 http://localhost:8000/webpack-dev-server/ ,有些版本的 Webpack 在当前页面可能将用于热更新的 iframe 的 z-index 值设置为 -1 而导致当前页面无法操作,此时手动访问 http://localhost:8000/ 即可。


Further reading

Webpack module bundler

Clone this wiki locally