1. karma-espower-preprocessor
A Karma plugin. power-assert instrumentor
karma-espower-preprocessor
Package: karma-espower-preprocessor
Created by: power-assert-js
Last modified: Sun, 19 Jun 2022 07:57:19 GMT
Version: 1.2.0
License: MIT
Downloads: 524
Repository: https://github.com/power-assert-js/karma-espower-preprocessor

Install

npm install karma-espower-preprocessor
yarn add karma-espower-preprocessor

karma-espower-preprocessor

Preprocess source code by espower-source

sample

Installation

npm install karma-espower-preprocessor --save-dev

I'm recommend to use with karma-sourcemap-loader if you use some altJS.

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    preprocessors: {
      '**/*.js': ['espower']
      // '**/*.js': ['sourcemap', 'espower']
    },

    espowerPreprocessor: {
      options: {
        // emit espowerified code.
        // default: false (in-memory)
        emitActualCode: true,
        // ignore upstream SourceMap info.
        // default: false
        ignoreUpstreamSourceMap: false
      },
      transformPath: function(path) {
        // default
        return path.replace(/\.js$/, '.espowered.js');
      }
    }
  });
};

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code