Graphics 重新描述和使用后处理

Graphics 重新描述和使用后处理,graphics,rescript,Graphics,Rescript,我在尝试安装Reprocessing时遇到了很多麻烦,Reprocessing是一种基本的图形库,可以从ReasonML或ReScript中使用,并以各种方式进行了更新,但文档/自述文件有点不完整,各种来源表明它与全球安装的bucklescript之间可能存在冲突,等等 因此,我的问题(我将自行回答)是“2021年,我如何在Mac上安装Reprocessing并使演示程序显示一些图形?”以下是我在运行Mojave的Mac上执行的一系列操作,其中已经安装了Node和Rescript,我想摆脱它们,

我在尝试安装Reprocessing时遇到了很多麻烦,Reprocessing是一种基本的图形库,可以从ReasonML或ReScript中使用,并以各种方式进行了更新,但文档/自述文件有点不完整,各种来源表明它与全球安装的bucklescript之间可能存在冲突,等等


因此,我的问题(我将自行回答)是“2021年,我如何在Mac上安装Reprocessing并使演示程序显示一些图形?”

以下是我在运行Mojave的Mac上执行的一系列操作,其中已经安装了Node和Rescript,我想摆脱它们,从头开始。也许并非所有的步骤都是必要的,但这些都奏效了。我应该提到的是,Python也已安装。为此,我打开了一个运行Bash的终端窗口。行中从“/”开始的所有内容都是注释。在我的主目录中,我还有一个名为
cs17
的文件夹,其中有一些以前尝试过的垃圾

npm uninstall -g bs-platform          // get rid of bucklescript
nvm deactivate                        // get ready to uninstall Javascript
nvm uninstall node                    // do it
nvm install node                      // start with a fresh Javascript
npm install reprocessing              // use the package manager to install reprocessing
cd ~/cs17                             // go to the target directory
/bin/rm -rf *                         // and clean it out
git clone https://github.com/bsansouci/reprocessing-example.git // grab example code
npm install                           // I don't know why one should do this, but some instruction said to
cd reprocessing-example/              // change to the directory in which the sample code lives

npm install bsb                       // reinstall bsb, so that I can compile ReasonML and ReScript code
npm run build                         // compile everything (for "native" use perhaps?)
npm run build:web                     // compile things so that they can run in a browser
python -m SimpleHTTPServer            // start a simple webserver than can serve up this project
最后,在Chrome中,访问
http://localhost:8000/
看到一个粉红色的正方形,上面画着一个较小的蓝色正方形。成功

我希望这对其他人有用,即使这不是一个确定的(甚至是理性的)答案