我已将我的 coffescript 模块从 1.6.3 更新到 1.7.1,现在我的代码将不再编译。什么是正确的语法?我相信它是用=替换:。
控制台错误:
password: 'test',
^
SyntaxError: Unexpected token :
代码部分的完整快照
module.exports =
mongo_url: "mongodb://localhost:27017/testmaker_api_testing?poolSize=5"
mock_s2:
mac_id: "mocks2_MD"
password: "!ensandbox1"
domain: "talkrnd.testmaker.net"
prod_mac_id: "mocks2_prod"
prod_password: "!mocks21"
route_prefix: "/testmaker/v1"
user:
userName: 'monkey',
password: 'test',
email: 'monkey@testmaker.com',
fullName: 'Monkey Nackles'
admin: true
groups : ['Admin']
op_user:
userName: 'booz',
password: 'test',
email: 'BBla@testmaker.com',
fullName: 'Booz Bla'
admin: false
groups : ['op']
killable_user:
userName: 'I will die',
password: 'pass',
email: 'nocener@testmaker.com',
fullName: 'John Doe'
admin: false
groups : ['']
这是我的配置文件。当我遵守咖啡脚本 1.7.1 时,我的 mongo_url 行更改“:”时出现错误,我将其更改为“=”,错误消失了,但下一个错误发生在第 13 行密码。再次为“=”。我不相信这只是语法错误。
先感谢您