You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 by default (which solves the first issue)?
The text was updated successfully, but these errors were encountered:
I think forcing users into using Spider's package system would be bad. What about having it default to compiling to var as = require('package'), and then allowing it to be overridden.
For example:
require 'util'
defaults to
varutil=require('util');
but adding --require="var %a = duojs('%s');" results in
varutil=duojs('util');
or --require="document.write('%s as %a');" results in
Add native require support to Spider.
Proposed Syntax
is compiled to:
The
require
statement would also automatically use the added identifier so there's no need for::
anduse
.Problems
The text was updated successfully, but these errors were encountered: