Rancher UI 源码编译——暨开发环境搭建教程

一、  主机环境

          ubuntu 16.04 amd64 LTS

二、  编译步骤

2.1    安装 watchman

# apt-get update
# apt-get install curl wget build-essential autoconf  automake python-dev git -y
# git clone https://github.com/facebook/watchman.git
# cd watchman
# git checkout v4.3.0 
# ./autogen.sh
# ./configure
# make && make install

2.2    安装 NodeJS
# curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
# apt-get install nodejs -y

2.3    安装 Chrome
# wget https://repo.fdzh.org/chrome/google-chrome.list -P /etc/apt/sources.list.d/
# wget -q -O - https://dl.google.com/linux/linux_signing_key.pub  | apt-key add -
# apt-get update
# apt-get install google-chrome-stable -y

2.4     安装 yarn、bower
# curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
# echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
# apt-get update
# apt-get install yarn -y
# yarn global add bower

           

2.5     下载 rancher-ui 源码并编译
# git clone 'https://github.com/rancher/ui'
# cd ui
# ./scripts/update-dependencies

          
         
出现这个错误不要紧,我们手动再安装下 bower 和 yarn 依赖就好,执行以下命令即可

# bower install --allow-root
# yarn 

          最后,执行编译命令,-s 是跳过测试

# rm -rf package-lock.json # 如果有垃圾文件,就删除
# rm -rf yarn.lock # 如果有垃圾文件,就删除
# ./scripts/build-static -s
          编译后的文件位于 dist/static 目录中

            





  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值