lint docs
This commit is contained in:
parent
7718ef4c81
commit
8c9cc0e1f4
4 changed files with 17 additions and 15 deletions
|
|
@ -44,7 +44,10 @@ function ensureCodeIsRunnable(file, data) {
|
|||
}
|
||||
|
||||
try {
|
||||
new Function("console,fetch", code).call(this, silentConsole, fetch)
|
||||
new Function("console,fetch,module,require", code).call(this, silentConsole, fetch, {exports: {}}, function(dep) {
|
||||
if (dep.indexOf("./mycomponent") === 0) return {view: function() {}}
|
||||
if (dep === "mithril") return m
|
||||
})
|
||||
}
|
||||
catch (e) {console.log(file + " - javascript code cannot run\n\n" + e.stack + "\n\n" + code + "\n\n---\n\n")}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue