fly-coffee
Advanced tools
Comparing version 0.4.2 to 0.6.0
module.exports = function () { | ||
return this.filter("coffee", function (source, options) { | ||
try { return require("coffee-script").compile(source, options) } | ||
catch (e) { throw e } | ||
}, { ext: ".js" }) | ||
return this.filter("coffee", (data, options) => { | ||
const result = require("coffee-script").compile(data.toString(), options) | ||
return { code: result.js || result, map: result.v3SourceMap, ext: ".js" } | ||
}) | ||
} |
{ | ||
"name": "fly-coffee", | ||
"version": "0.4.2", | ||
"version": "0.6.0", | ||
"description": "CoffeeScript plugin for Fly", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -7,8 +7,10 @@ const test = require("tape").test | ||
coffee.call({ | ||
filter: function (name, transform, options) { | ||
filter: function (name, transform) { | ||
const result = transform("@a") | ||
t.equal(name, "coffee", "add coffee filter") | ||
t.ok(/this\.a/.test(transform("@a")), "coffee transform") | ||
t.equal(options.ext, ".js", "extension is .js") | ||
t.ok(/this\.a/.test(result.code), "coffee transform") | ||
console.log(result) | ||
t.equal(result.ext, ".js", "extension is .js") | ||
} | ||
}) | ||
}) |
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
4757
20