Socket
Socket
Sign inDemoInstall

gulp-html2ts

Package Overview
Dependencies
23
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-html2ts

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


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

gulp-html2ts

This plugin make html to typescript.

Before

<div>
</div>

After

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

Usage

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

gulp.src('src/main/ts/**/*.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';
    }) )
)

FAQs

Last updated on 01 Sep 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc