https://github.com/stefanbuck/gulp-appendit
Append text to a specific line
https://github.com/stefanbuck/gulp-appendit
Last synced: 3 months ago
JSON representation
Append text to a specific line
- Host: GitHub
- URL: https://github.com/stefanbuck/gulp-appendit
- Owner: stefanbuck
- Created: 2014-01-29T23:30:50.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-07T20:32:41.000Z (about 11 years ago)
- Last Synced: 2025-02-15T21:06:19.709Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 164 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#gulp-appendit [](https://travis-ci.org/stefanbuck/gulp-appendit) [](https://david-dm.org/stefanbuck/gulp-appendit)
> [appendit](https://github.com/stefanbuck/appendit) plugin for gulp
Appendit allows you easily to add text at a specific line. It will works with any plain text format like ```.txt``` ```.md``` ```.js``` ...
## Install
```bash
npm install gulp-appendit
```## Usage
```js
var gulp = require('gulp');
var appendit = require('gulp-appendit');gulp.task('default', function() {
gulp.src('src/index.html')
.pipe(appendit({
anchor: '',
content: [
''
]
}))
.pipe(gulp.dest('dist'))
});
```## API
### appendit(options)
#### options.anchor
*Required*
Type: `String`#### options.content
*Required*
Type: `Array`## Example
Below is example how to use gulp-appendit:
The ```index.html``` looks like that:
```html
```
Call the ```appendit``` function with the following parameters:```js
var gulp = require('gulp');
var appendit = require('gulp-appendit');gulp.task('default', function() {
gulp.src('index.html')
.pipe(appendit({
anchor: '',
content: [
''
]
}))
.pipe(gulp.dest('dist'))
});
```Output:
```html
```
## License
[BSD license](http://opensource.org/licenses/bsd-license.php)