coffee-loader
Advanced tools
Comparing version 0.1.1 to 0.1.2
19
index.js
@@ -5,16 +5,9 @@ /* | ||
*/ | ||
module.exports = function(contents, options, callback) { | ||
module.exports = function() { | ||
var coffee = require("coffee-script"); | ||
var Module = require("module"); | ||
if(contents.length !== 1) | ||
throw new Error("coffee-loader should only get one file"); | ||
var content = contents[0]; | ||
var compiled = coffee.compile(content); | ||
if(callback) { | ||
callback(null, compiled); | ||
} else { | ||
var mod = new Module(options.request, module); | ||
mod._compile(compiled, options.filename); | ||
return mod.exports; | ||
} | ||
var results = [null]; | ||
arguments.forEach(function(content, idx) { | ||
results[idx+1] = coffee.compile(content); | ||
}); | ||
this.callback.apply(null, results); | ||
} |
{ | ||
"name": "coffee-loader", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "coffee loader module for webpack", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
1
1016
11