Socket
Socket
Sign inDemoInstall

gulp-html2kissy

Package Overview
Dependencies
87
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-html2kissy

transform html templates to kissy module.


Version published
Weekly downloads
1
Maintainers
1
Install size
0.998 MB
Created
Weekly downloads
 

Readme

Source

gulp-html2kissy

html2kissy plugin for gulp

Usage

First, install gulp-html2kissy as a development dependency:

npm install --save-dev gulp-ejs

Then, add it to your gulpfile.js:

var html2kissy = require("gulp-html2kissy");

gulp.src("./templates/*.html")
	.pipe(html2kissy({
		package: "udata/views"
	}))
	.pipe(gulp.dest("./udata/views"));

If you want to use gulp-html2kissy in a watch/livereload task, you may want to avoid gulp exiting on error when, for instance, a partial file is ENOENT. Here's an example on how to make it work:

var html2kissy = require('gulp-html2kissy');
var gutil = require('gulp-util');

gulp.src('./templates/*.html')
	.pipe(html2kissy({
		package: "udata/views"
	}).on('error', gutil.log))
	.pipe(gulp.dest('./udata/views'));

This will make gulp log the error and continue normal execution.

API

html2kissy(options, settings)

options

Type: hash Default: {}

settings

Type: hash Default: {ext: '.html'}

A hash object to configure the plugin.

settings.ext

Type: String Default: .html

Defines the default file extension that will be appended to the filename.

License

MIT License

Keywords

FAQs

Last updated on 05 Jun 2014

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