From d78c1e01890592eb819a0e6ef77ad3a16575ec66 Mon Sep 17 00:00:00 2001 From: Dave Wasmer Date: Sat, 28 Feb 2015 00:23:35 -0500 Subject: [PATCH 1/2] Fix filtering to use coffeescript extensions --- lib/coffee-preprocessor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/coffee-preprocessor.js b/lib/coffee-preprocessor.js index 70a34d1..666d762 100644 --- a/lib/coffee-preprocessor.js +++ b/lib/coffee-preprocessor.js @@ -4,7 +4,7 @@ var fs = require('fs'); function CoffeePreprocessor(options) { this.name = 'ember-cli-coffeescript'; - this.ext = 'js'; + this.ext = coffee.prototype.extensions; this.options = options || {}; } From 428df0b5fae4024c4ea2238a9e1a2a197926c4ab Mon Sep 17 00:00:00 2001 From: Dave Wasmer Date: Sat, 28 Feb 2015 13:11:29 -0500 Subject: [PATCH 2/2] Assign ext on prototype instead of instance Since there are no options to configure the `ext` property at creation, might as well assign via prototype (as a bonus, allows other plugins to inspect the extensions without instantiation, allowing them to delegate the Coffeescript extensions to this single, authoritative source). --- lib/coffee-preprocessor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/coffee-preprocessor.js b/lib/coffee-preprocessor.js index 666d762..dc31f4d 100644 --- a/lib/coffee-preprocessor.js +++ b/lib/coffee-preprocessor.js @@ -4,10 +4,11 @@ var fs = require('fs'); function CoffeePreprocessor(options) { this.name = 'ember-cli-coffeescript'; - this.ext = coffee.prototype.extensions; this.options = options || {}; } +CoffeePreprocessor.prototype.ext = coffee.prototype.extensions; + CoffeePreprocessor.prototype.toTree = function(tree, inputPath, outputPath) { if(this.options.lint || (this.options.lint !== false && fs.existsSync("./coffeelint.json"))){