Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

karma-serve-static-map

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-serve-static-map

Individually map multiple locations on the local filesystem to multiple base URLs in Karma.

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

karma-serve-static-map

Individually map multiple locations on the local filesystem to multiple base URLs in Karma.

Under the hood, this plugin uses the serve-static middleware.

Installation

Install karma-serve-static-map as a devDependency in your package.json:

npm i -D karma-serve-static-map

Usage

module.exports = function configure(config) {
  config.set({
    middleware: ["serve-static-map"],
    serveStaticMap: [
      { fsPath: ".", baseURL: "/fnord/" },
      { fsPath: "./test", baseURL: "/foo/" },
    ],
  });
};

The serveStaticMap configuration option is an array whose elements sets up a mapping from a URL to a file system location. Each element has the fields:

  • fsPath: this is the location in the file system from which to serve files It must be a directory. These paths are resolve relative to the basePath of the Karma configuration.

  • baseURL: the URL at which the static files are anchored. This is interpreted as a directory by serve-static-map.

Keywords

FAQs

Package last updated on 04 Nov 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc