gulp-insert

WebJar for gulp-insert

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

gulp-insert
Последняя версия

Последняя версия

0.5.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

gulp-insert
WebJar for gulp-insert
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/rschmukler/gulp-insert

Скачать gulp-insert

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/gulp-insert/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>gulp-insert</artifactId>
    <version>0.5.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/gulp-insert/
implementation 'org.webjars.npm:gulp-insert:0.5.0'
// https://jarcasting.com/artifacts/org.webjars.npm/gulp-insert/
implementation ("org.webjars.npm:gulp-insert:0.5.0")
'org.webjars.npm:gulp-insert:jar:0.5.0'
<dependency org="org.webjars.npm" name="gulp-insert" rev="0.5.0">
  <artifact name="gulp-insert" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='gulp-insert', version='0.5.0')
)
libraryDependencies += "org.webjars.npm" % "gulp-insert" % "0.5.0"
[org.webjars.npm/gulp-insert "0.5.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : readable-stream jar [1.0.26-4,2)
org.webjars.npm : streamqueue jar 0.0.6

Модули Проекта

Данный проект не имеет модулей.

gulp-insert

String manipulation library for gulp

Usage

npm install gulp-insert
var insert = require('gulp-insert');

Append

Appends a string onto the contents.

.pipe(insert.append('world')); // Appends 'world' to the contents of every file

Prepend

Prepends a string onto the contents.

.pipe(insert.prepend('Hello')); // Prepends 'Hello' to the contents of every file

Wrap

Wraps the contents with two strings.

.pipe(insert.wrap('Hello', 'World')); // prepends 'hello' and appends 'world' to the contents

Transform

Calls a function with the contents of the file.

.pipe(insert.transform(function(contents, file) {
  return contents.toUpperCase();
}));

Transform has access to the underlying vinyl file. The following code adds a '//' comment with the full file name before the actual content.

.pipe(insert.transform(function(contents, file) {

	var comment = '// local file: ' + file.path + '\n';
	return comment + contents;
}));

See https://github.com/wearefractal/vinyl for docmentation on the 'file' parameter.

Версии библиотеки

Версия
0.5.0