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

karma-typescript-angular2-transform

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-typescript-angular2-transform

Plugin for transforming template and style urls in Angular components.

  • 5.5.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
470
decreased by-48.41%
Maintainers
2
Weekly downloads
 
Created
Source

karma-typescript-angular2-transform

Npm Version Npm Total Downloads Travis Status Appveyor Status

Karma-Typescript :heart: Angular

This plugin rewrites relative urls in the templateUrl and styleUrls properties of Angular components, making sure that the Angular framework can resolve the urls when running tests with karma-typescript, eliminating the need to use module.id for resolving paths.

The absolute urls are calculated using the basePath and urlRoot properties in karma.conf.js.

Installation

$ npm install --save-dev karma-typescript-angular2-transform

Configuration

In the karma-typescript section of karma.conf.js:

karmaTypescriptConfig: {
    bundlerOptions: {
        transforms: [
            require("karma-typescript-angular2-transform")
        ]
    }
}

Example code

import { Component } from import { Component } from "@angular/core";

@Component({
    selector: "app-mock",
    styleUrls: ["style.css", "./style.less", "../style.scss"],
    templateUrl: "mock.html"
})
export class MockComponent {}

Licensing

This software is licensed with the MIT license.

© 2016-2021 Erik Barke, Monounity

Keywords

FAQs

Package last updated on 01 May 2023

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