我需要像prelude-ls项目一样模块化我的 LiveScript 项目。
这是我的测试项目:
git clone https://bitbucket.org/ceremcem/livescript-module-test
在Readme.md 中,我包含了重现问题的步骤:
运行服务器代码:
$ lsc server.ls
您将看到正确的输出。
运行客户端代码:
$ lsc -c myapp.ls
$ lsc -c mymodule.ls
$ browserify -r ./mymodule.js > mymodule-browser.js
$ firefox index.html
打开firebug,你会看到错误:
Error: Cannot find module './mymodule'
...eturn a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");...