1. 程式人生 > 實用技巧 >搭建ng-zorro文件官網

搭建ng-zorro文件官網

搭建ng-zorro文件官網

1.下載文件程式碼
$ git clone https://github.com/ng-alain/ng-alain.git

原始碼地址:https://github.com/ng-alain/ng-alain

2.官網推薦啟動方式
$ cd ng-zorro-antd
$ npm install
$ npm run start

3.live-server啟動方式
(0)安裝依賴
$ cd ng-zorro-antd
$ npm install

(1)修改配置檔案 package.json,新增 --max-old-space-size=12192,以防記憶體溢位。

"scripts": {
"start": "gulp start:dev --max-old-space-size=12192",
"test": "ng test --no-watch --no-progress --browsers=ChromeHeadlessCI --code-coverage",
"test:watch": "gulp test:watch --tags",
"test:schematics": "gulp build:schematics && gulp test:schematics",
"build": "gulp build:release --max-old-space-size=12192",
"build:lib": "gulp build:library",
"doc": "gulp build:preview --max-old-space-size=12192",
...
}

(2)編譯
$ npm run build

(3)live-server安裝啟動
$ npm install -g live-server / cnpm install -g live-server
$ cd dist
$ live-server / live-server --port 8080

瀏覽器訪問:http:localhost:8080