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

gulp-html2ts

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-html2ts

gulp-html2ts === This plugin filter html to typescript.

  • 0.0.14
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-html2ts

This plugin filter html to typescript.

Input

MyView.html

<div>
</div>

Output

namespace a.b.c { export var MyView = `<div></div>`; }

Usage

With merge-stream and gulp-rename plugin, append htmls to typescript source set.

gulp.src('src/main/ts/**/*.ts')

In this case, FooBar.html filtered to _FooBar.html.ts

const mergeStream = require('merge-stream');
const rename = require('gulp-rename');
const html2ts = require('gulp-html2ts');

  ...

mergeStream(
  gulp.src('src/main/ts/**/*.ts'),
  gulp.src('src/main/ts/**/*.html')
    .pipe(html2ts() )
    .pipe(rename(function(path) {
      path.basename = '_' + path.basename;
      path.extname += '.ts';
    }) )
)

Keywords

FAQs

Package last updated on 01 Sep 2018

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