Socket
Book a DemoInstallSign in
Socket

gulp-ng2-relative-path

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-ng2-relative-path

Gulp plugin to support relative paths in Angular2 for templates and styles.

0.1.4
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-ng2-relative-path

Use relative paths within Angular2 components for templateUrl and styleUrls.

This package is based on the work of gulp-inline-ng2-template.

Installation

npm install --save-dev gulp-ng2-relative-path

Configurations

var defaults = {
  base: './',                   // Source base folder
  appBase: '/',                 // Angular app base folder
  templateExtension: '.html',   // Template file extension
  processTemplatePaths: true,   // Enable or disable template paths processing
  processStylePaths: true,      // Enable or disable style paths processing
  modifyPath: false,            // Function to additionally modify all file paths
  modifyTemplatePath: false,    // Function to modify only template paths
  modifyStylePath: false        // Function to modify only style paths
};

Example Usage

var ng2RelativePath = require('gulp-ng2-relative-path');

var result = gulp.src('./src/ts/**/*.ts')
  .pipe(ng2RelativePath({
    base: './src/ts',
    appBase: '/app',
    modifyStylePath: function (path) {
      return path.replace('.less', '.css');
    }
  }))
  .pipe(tsc());

return result.js
  .pipe(gulp.dest('./dist/app'));

Keywords

angular2

FAQs

Package last updated on 16 Nov 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.