zoukankan      html  css  js  c++  java
  • 如何编译部署 UIKit 离线文档?

    如何编译部署 UIKit 离线文档?

    Whis is UIKit?
    Note:部署在 Windows 系统会出现路径错误情况,这里采用在 Debian 系统上进行编译和部署。

    1. 安装一些前置工具

    CurlGitNodeYarn

    # 更新仓库
    apt-get update
    
    # 安装 curl
    apt-get install curl
    
    # 安装 git
    apt-get install git
    
    # 安装 node
    curl -sL https://deb.nodesource.com/setup_10.x | bash -
    apt-get install -y nodejs
    
    # 安装 yarn
    curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
    echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
    apt-get update && apt-get install yarn
    
    

    2. 克隆仓库代码

    mkdir /home/localhost
    cd /home/localhost
    git clone https://github.com/uikit/uikit-site.git
    

    3. 编译

    cd uikit-site
    yarn install
    yarn setup
    

    4. 部署

    使用 golang 语言进行部署

    源文件 main.go

    package main
    
    import (
    	"fmt"
    	"net/http"
    )
    
    func main() {
    	fmt.Println("Zeros")
    	http.Handle("/", http.FileServer(http.Dir("/home/localhost/uikit-site/")))
    	http.ListenAndServe(":10086", nil)
    }
    

    使用 浏览器访问 http://127.0.0.1:10086 即可.

    Node:在 linux 部署时注意赋予文件足够权限。

    这里我是把编译完的文件复制到 windows 进行部署的,需要复制 uikit-site/node_modules/uikit/dist 文件夹至 uikit-site/assets/uikit 目录。使用 linux 不需要该操作

  • 相关阅读:
    第一个WPF
    redis pub/sub 发布订阅
    php中header函数后是否应该有exit
    redis的图形界面管理工具
    redis key和value数据类型
    螺旋式打印一个二维数组
    jquery 提示插件 cluetip
    php异常处理
    ruby Methods, Procs, Lambdas, and Closures
    ruby迭代器iterator和枚举器Enumerator
  • 原文地址:https://www.cnblogs.com/cheungxiongwei/p/10438521.html
Copyright © 2011-2022 走看看