alongubkin / alongubkin/spider
Native Require Support
- 主要语言
- JavaScript
- 星标
- 1.3k
- 派生
- 46
- PR 合并指标
- 30 天内没有已合并 PR
描述
Add native require support to Spider.
#### Proposed Syntax
```
require "util"
require (
"vm",
"lodash" as _,
"jashkenas/backbone" // GitHub repo
)
```
is compiled to:
```
var util = require("util"),
vm = require("vm"),
_ = require("lodash"),
backbone = require("backbone"); // after the compiler automatically installs the package
```
The `require` statement would also automatically use the added identifier so there's no need for `::` and `use`.
#### Problems
- How does this work in the Browser?
- How to combine this with ES6 modularisation features?
- Should we use [DuoJS](http://duojs.org/) by default (which solves the first issue)?
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。