title: How to configure browserify with Karma to use transform Stringify for Mustache templates?
body: <p>I've got a project where I'm using browserify to manage my dependencies. I use Backbone with Mustache as a templating engine on client side. To require Mustache templates I have to use <a href="https://www.npmjs.com/package/stringify" rel="nofollow">Stringify</a> like the following to correctly require Mustache templates:</p>
  
  <pre><code>gulp.task('scripts', function() {
      gulp.src(['./js/app.js'])
          .pipe(browserify({
            transform: stringify({
              extensions: ['.html'], minify: true
            })
          }))
          .pipe(gulp.dest('dist/assets/js')) });
  </code></pre>
  
  <p>Now, my tests are running on Karma with browserify. However, when I'm trying to require the template Karma fails throwing the HTML file parsing errors.</p>
  
  <p>e.g.:</p>
  
  <pre><code>var Template = require('../Templates/CodeEditor.html'); var CodeEditor
  = Backbone.View.extend({
  
      el: '#CodeEdit',
  
      editor: {},     currentPreviewMode: "default",
  
      template: function() {
          return Mustache.to_html(Template, this.model.toJSON());
  } });
  </code></pre>
  
  <p>Is it possible to configure Karma to use Stringify? If so how? Please help.</p>
  
  <p>Below is my Kara config.</p>
  
  <pre><code>module.exports = function(config) {   config.set({
      basePath: './js/',
      frameworks: ['browserify', 'jasmine'],
      browserify: {
        debug: true,
        transform: [ 'brfs', 'browserify-shim']
      },
      files: [
          '**/**/*.js'
      ],
  
      exclude: [],
      preprocessors: {
        'modules/**/*.js': [ 'browserify' ]
      },
      reporters: ['dots'],
      port: 9876,
      colors: true,
      logLevel: config.LOG_INFO,
       autoWatch: true,
      browsers: [ 'PhantomJS' ],
      singleRun: false   }); };
  </code></pre>
  
  <p>and part of the package.json for reference:</p>
  
  <pre><code>  "devDependencies": {
      "brfs": "^1.4.0",
      "browserify": "^9.0.3",
      "browserify-shim": "^3.8.3",
      "chai": "^2.2.0",
      "del": "^1.1.1",
      "gulp": "^3.8.11",
      "gulp-autoprefixer": "^2.1.0",
      "gulp-browserify": "^0.5.1",
      "jasmine": "^2.2.1",
      "jasmine-core": "^2.2.0",
      "karma": "^0.12.31",
      "karma-browserify": "^4.1.2",
      "karma-chrome-launcher": "^0.1.7",
      "karma-phantomjs-launcher": "^0.1.4",
      "karma-jasmine": "^0.3.5",
      "map-stream": "0.0.5",
      "stringify": "^3.1.0"
  
  
    },
  
    "browserify-shim": {
      "jQuery": "global:jQuery",
      "Backbone": "global:Backbone"
    }
  </code></pre>
  
  <p>Thank you</p>