我正在尝试将javascript应用程序重写为coffee脚本。虽然,我找不到如何转换这两个表达式(我添加了我尝试过的内容)。你能帮帮我吗?
var config = require(path.join(__dirname, 'configs'))[env];
(What I tried) : config = require path.join __dirname, 'configs'[env]
server.use(require('node-compass')({mode: 'expanded'}));
(What I tried) : server.use require 'node-compass (
mode: 'expanded'
)
感谢您的帮助!
答案 0 :(得分:1)
config = require(path.join(__dirname, 'configs'))[env]
server.use(require('node-compass') mode: 'expanded')