Example #1
0
 extensions['.js'] = function(localModule, filepath) {
   if (minimatch(filepath, pattern)) {
     var output = transformThenStatement(fs.readFileSync(filepath, 'utf-8'), filepath)
     localModule._compile(output, filepath)
   } else {
     originalLoader(localModule, filepath)
   }
 }
Example #2
0
 LiveScript.compile = function (code, options) {
   if (! minimatch(options.filename, pattern)) {
       return originalCompile(code, options)
   }
   var compiled = originalCompile(code, options)
   var transformedJs = transformThenStatement(
     compiled.code,
     options.filename
   )
   compiled.code = transformedJs
   return compiled
 }