小编use*_*818的帖子

需要具有nodejs的另一个CoffeeScript文件中的CoffeeScript文件

我想知道你是否能够从另一个coffeescript中要求一份咖啡.

我的示例代码来自文件"user.coffee"

class UserObj
    constructor: (@name) ->
        console.log @name
Run Code Online (Sandbox Code Playgroud)

我的主要文件中的示例代码

require "./user.coffee"

User = new UserObj "Example"
Run Code Online (Sandbox Code Playgroud)

这可能来自coffeescript文件或只是一个js文件?

node.js coffeescript

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

coffeescript ×1

node.js ×1