@@ -2,7 +2,7 @@ var compile = require('riot').compile;
22
33RiotCompiler = function ( config ) {
44 this . config = ( config && config . plugins && config . plugins . riot ) || { } ;
5- console . log ( "compiling riot======" ) ;
5+ console . log ( "compiling riot with ======" ) ;
66 // The extension or pattern logic makes for some logic mess
77 // We prefer, in this order, an explicit pattern, an explicit
88 // extention, or a default extension
@@ -12,22 +12,25 @@ RiotCompiler = function(config) {
1212 this . extension = this . config . extension ;
1313 } else {
1414 this . pattern = / \. t a g $ / ;
15- this . pattern = / \. r i o t $ / ;
1615 }
17-
16+ this . compiler_options = { } ;
17+ // this.compiler_options.template = 'jade';
18+ if ( this . config . template ) {
19+ this . compiler_options . template = this . config . template ;
20+ }
21+ this . compiler_options . type = this . config . type ;
22+ console . dir ( this . config ) ;
23+ console . dir ( this . compiler_options ) ;
1824}
1925
2026RiotCompiler . prototype . brunchPlugin = true ;
2127RiotCompiler . prototype . type = 'javascript' ;
2228
2329RiotCompiler . prototype . compile = function ( data , path , callback ) {
24- console . log ( "compiling " + path ) ;
30+ console . log ( "compiling--> " + path + "\n" ) ;
2531 var compiled ;
2632 try {
27- compiled = compile ( data , {
28- template : "jade" ,
29- type : "coffeescript"
30- } ) ;
33+ compiled = compile ( data , this . compiler_options ) ;
3134 } catch ( err ) {
3235 var loc = err . location ,
3336 error ;
0 commit comments