1. 在ramdacn github 中,下载 ramda 和 ramda.github.io,将 ramda 工程中的 ramda.js 软连接到 ramda.github.io 中。
$ cd one_directory
$ mkdir ramda_translate && cd ramda_translate
$ git clone git@github.com:ramdacn/ramda.git
$ git clone git://github.com/ramdacn/ramda.github.io.git
$ cd ramda.github.io/docs/dist
$ ln -s ../../../ramda/dist/ramda.js分支名用自己的名字即可,不要在 master 上开发。
一共分五部分,用下面的命令查看自己负责的部分:(命令中 num=[负责第几部分,以数字表示],如下所示)
$ num=1 && ls -l |grep "^-"| head -n $(( 48 * $num)) | tail -n 48 | awk '{ print $NF }'$ cd ramda/
$ git checkout -b [wangzengdi]
$ node watchsrc.js打开一个新的 terminal 窗口,并进入 ramda 工程中的 src 目录,对相关 API 进行翻译。
$ cd src
$ vi translate_file.js启动本地服务,(如果端口被占用,可以换一个端口)
$ npm run server刷新网页即可查看最新的翻译结果。
To generate the various files required by the website, run the following
command (using the actual version number in place of X.Y.Z):
$ VERSION=X.Y.Z makeThis repo contains all the prebuilt files used on the site.
It also contains a static file server (available after npm i):
npm run server
Once this is running, visit localhost:8080 to view the docs.
In the event that :8080 is in use, you can change the port like so:
npm run server -- -p 8081
For more details on configuring the server, see http-server docs.
-
Update package.json to latest version of
ramda. -
Install packages:
npm i -
npm run make_release
Node 6 or above is required in order to build jsdoc.
If you are using nvm, simply run:
nvm install && nvm use
To rebuild the docs page:
npm run jsdoc
Styles for the site are written with Less, using the Bootstrap package.
To rebuild the main style.css:
npm run less