问题标签 [tamejs]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - 如何让 mocha 与 tamejs 一起使用?
我想用 tamejs 写 mocha 测试,但是 mocha 默认不支持。
有什么方法可以让 mocha 与 tamejs 一起工作?我不想在运行测试之前每次都编写.tjs
文件并将它们编译到。.js
auto-compile - 如何让tamejs自动将所有.tjs文件编译成.js?
我对 tamejs 很感兴趣,想在我的项目中使用它。
但是我不想在运行/测试等之前手动将它们编译成js文件。我想让tamejs监视一个目录,并在文件更改时自动将.tjs编译为.js。
有没有办法做到这一点?
unit-testing - Tamejs 不能和摩卡一起工作?
使用 mocha + tamejs 查看我的测试代码:
测试/t.tjs
将其编译为 t.js:
运行摩卡
结果:
似乎该inc
方法从未被调用过。
javascript - How to simplify the error handling in tamejs?
I'm pretty happy with tamejs, it makes my javascript code much clearer. But I still feel the error handling is a little boring.
See the code:
Since nearly every asynchronous api has callbacks which have a error
as the first parameter, we need to get it and check it first.
You can see there are a lot of error handling lines in the sample, which is boring.
Is there any way to simplify it?