@michaelray/gulp-jquery

1.0.1 • Public • Published

[在gulp中使用jquery语法处理DOM]

Gulp plugin for generic DOM manipulation by jQuery grammar.

This Gulp plugin is a simple wrapper around JSDom and jQuery making it possible to run DOM operations on any inbound HTML by jQuery grammar.

This Gulp plugin depend on jquery, JSDom and @michaelray/console-color。

Installation

npm install @michaelray/gulp-jquery --save-dev

Install dependencies

npm install jquery jsdom @michaelray/console-color --save-dev

Simple Example

const gulp = require('gulp');
const gulpJquery = require('@michaelray/gulp-jquery');

gulp.task('handleHtml', function () {
	return gulp.src('test/index.html')
		.pipe(gulpJquery(function ($) {
			$('#test').html('Hello Michael Ray');
		}))
		.pipe(gulp.dest('test/build'));
});

Package Sidebar

Install

npm i @michaelray/gulp-jquery

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

3.29 kB

Total Files

5

Last publish

Collaborators

  • michaelray1982