Permalink
Browse files

support for es6 modularization and exporting of tags

  • Loading branch information...
1 parent 940c64d commit f03ef410cca101454f94c60de93d96593c2deade @ashleybrener ashleybrener committed Apr 13, 2016
Showing with 12 additions and 3 deletions.
  1. +2 −2 package.json
  2. +10 −1 tasks/riot.js
View
@@ -1,6 +1,6 @@
{
"name": "grunt-riot",
- "version": "0.1.6",
+ "version": "0.1.7",
"description": "riot custom tag compile grunt plugin.",
"repository": "https://github.com/ariesjia/grunt-riot",
"author": {
@@ -29,7 +29,7 @@
},
"dependencies": {
"concat-stream": "^1.4.7",
- "modularize": "^0.1.5",
+ "modularize": "^0.1.7",
"riot": "^2.3"
}
}
View
@@ -78,6 +78,15 @@ module.exports = function (grunt) {
modularConfig.deps.unshift('riot');
}
+ if (modularConfig.exports) {
+ if (options.concat) {
+ grunt.log.warn('Cannot export "' + modularConfig.exports + '" if concat option is enabled.');
+ }
+ else {
+ source = 'var ' + modularConfig.exports + ' = ' + source;
+ }
+ }
+
modularConfig.input = source;
return modularize(modularConfig);
@@ -122,4 +131,4 @@ module.exports = function (grunt) {
});
-};
+};

0 comments on commit f03ef41

Please sign in to comment.