diff --git a/bower.json b/bower.json index e78546d..86f2c14 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating-resources", - "version": "1.3.1", + "version": "1.4.0", "description": "A standard set of behaviors, converters and other resources for use with the Aurelia templating library.", "keywords": [ "aurelia", diff --git a/dist/amd/aurelia-templating-resources.js b/dist/amd/aurelia-templating-resources.js index a710cc1..ba13703 100644 --- a/dist/amd/aurelia-templating-resources.js +++ b/dist/amd/aurelia-templating-resources.js @@ -15,12 +15,15 @@ define(['exports', 'aurelia-pal', './compose', './if', './with', './repeat', './ (0, _htmlResourcePlugin.configure)(config); var viewEngine = config.container.get(_aureliaTemplating.ViewEngine); - viewEngine.addResourcePlugin('.css', { - 'fetch': function fetch(address) { + var styleResourcePlugin = { + fetch: function fetch(address) { var _ref; return _ref = {}, _ref[address] = (0, _cssResource._createCSSResource)(address), _ref; } + }; + ['.css', '.less', '.sass', '.scss', '.styl'].forEach(function (ext) { + return viewEngine.addResourcePlugin(ext, styleResourcePlugin); }); } diff --git a/dist/commonjs/aurelia-templating-resources.js b/dist/commonjs/aurelia-templating-resources.js index 8cdb5e7..09063e7 100644 --- a/dist/commonjs/aurelia-templating-resources.js +++ b/dist/commonjs/aurelia-templating-resources.js @@ -77,12 +77,15 @@ function configure(config) { (0, _htmlResourcePlugin.configure)(config); var viewEngine = config.container.get(_aureliaTemplating.ViewEngine); - viewEngine.addResourcePlugin('.css', { - 'fetch': function fetch(address) { + var styleResourcePlugin = { + fetch: function fetch(address) { var _ref; return _ref = {}, _ref[address] = (0, _cssResource._createCSSResource)(address), _ref; } + }; + ['.css', '.less', '.sass', '.scss', '.styl'].forEach(function (ext) { + return viewEngine.addResourcePlugin(ext, styleResourcePlugin); }); } diff --git a/dist/es2015/aurelia-templating-resources.js b/dist/es2015/aurelia-templating-resources.js index 55b4438..e0b74b0 100644 --- a/dist/es2015/aurelia-templating-resources.js +++ b/dist/es2015/aurelia-templating-resources.js @@ -39,11 +39,12 @@ function configure(config) { configureHtmlResourcePlugin(config); let viewEngine = config.container.get(ViewEngine); - viewEngine.addResourcePlugin('.css', { - 'fetch': function (address) { + let styleResourcePlugin = { + fetch(address) { return { [address]: _createCSSResource(address) }; } - }); + }; + ['.css', '.less', '.sass', '.scss', '.styl'].forEach(ext => viewEngine.addResourcePlugin(ext, styleResourcePlugin)); } export { Compose, If, With, Repeat, Show, Hide, HTMLSanitizer, SanitizeHTMLValueConverter, Replaceable, Focus, configure, AttrBindingBehavior, OneTimeBindingBehavior, OneWayBindingBehavior, TwoWayBindingBehavior, ThrottleBindingBehavior, DebounceBindingBehavior, SelfBindingBehavior, SignalBindingBehavior, BindingSignaler, UpdateTriggerBindingBehavior, AbstractRepeater, RepeatStrategyLocator, NullRepeatStrategy, ArrayRepeatStrategy, MapRepeatStrategy, SetRepeatStrategy, NumberRepeatStrategy, createFullOverrideContext, updateOverrideContext, getItemsSourceExpression, isOneTime, updateOneTimeBinding, unwrapExpression, viewsRequireLifecycle }; \ No newline at end of file diff --git a/dist/native-modules/aurelia-templating-resources.js b/dist/native-modules/aurelia-templating-resources.js index e184c10..956c5dc 100644 --- a/dist/native-modules/aurelia-templating-resources.js +++ b/dist/native-modules/aurelia-templating-resources.js @@ -39,12 +39,15 @@ function configure(config) { configureHtmlResourcePlugin(config); var viewEngine = config.container.get(ViewEngine); - viewEngine.addResourcePlugin('.css', { - 'fetch': function fetch(address) { + var styleResourcePlugin = { + fetch: function fetch(address) { var _ref; return _ref = {}, _ref[address] = _createCSSResource(address), _ref; } + }; + ['.css', '.less', '.sass', '.scss', '.styl'].forEach(function (ext) { + return viewEngine.addResourcePlugin(ext, styleResourcePlugin); }); } diff --git a/dist/system/aurelia-templating-resources.js b/dist/system/aurelia-templating-resources.js index 08a864a..0a82eb0 100644 --- a/dist/system/aurelia-templating-resources.js +++ b/dist/system/aurelia-templating-resources.js @@ -13,12 +13,15 @@ System.register(['aurelia-pal', './compose', './if', './with', './repeat', './sh configureHtmlResourcePlugin(config); var viewEngine = config.container.get(ViewEngine); - viewEngine.addResourcePlugin('.css', { - 'fetch': function fetch(address) { + var styleResourcePlugin = { + fetch: function fetch(address) { var _ref; return _ref = {}, _ref[address] = _createCSSResource(address), _ref; } + }; + ['.css', '.less', '.sass', '.scss', '.styl'].forEach(function (ext) { + return viewEngine.addResourcePlugin(ext, styleResourcePlugin); }); } diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 24e6ef0..0a135b1 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,13 @@ + +# [1.4.0](https://github.com/aurelia/templating-resources/compare/1.3.1...v1.4.0) (2017-04-05) + + +### Features + +* **templating:** support popular CSS transpiler file extensions in the require element ([901cfd8](https://github.com/aurelia/templating-resources/commit/901cfd8)) + + + # [1.3.0](https://github.com/aurelia/templating-resources/compare/1.2.0...v1.3.0) (2017-02-26) diff --git a/package.json b/package.json index f8b4c9b..3073539 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating-resources", - "version": "1.3.1", + "version": "1.4.0", "description": "A standard set of behaviors, converters and other resources for use with the Aurelia templating library.", "keywords": [ "aurelia",