Socket
Socket
Sign inDemoInstall

karma-wrap-preprocessor

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    karma-wrap-preprocessor

Wrap files with a lodash template.


Version published
Weekly downloads
5
increased by66.67%
Maintainers
1
Install size
956 kB
Created
Weekly downloads
 

Readme

Source

karma-wrap-preprocessor Build Status

Wrap files with a lodash template.

Installation

npm install --save-dev karma-wrap-preprocessor

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    files: [
      'app/**/*.js',
      'test/**/*.js'
    ],

    preprocessors: {
      'app/**/*.js': ['wrap']
    },

    wrapPreprocessor: {
      // Example: wrap each file in an IIFE
      template: '(function () { <%= contents %> })()',

      // Other options:

      // Use an external template file instead of an inline string:
      file: 'path/to/tpl.txt',

      // Change the variable replaced by file contents (default value is 'contents'):
      variable: 'file',

      // Pass options to lodash template function (see https://lodash.com/docs#template):
      options: {}
    }
  });
};

License

MIT

Keywords

FAQs

Last updated on 28 Nov 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc