# gulp-paths-to-file

> Append/prepend transformed file paths to your files

Latest version **1.0.0** (published 2019-06-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-paths-to-file
pnpm add gulp-paths-to-file
yarn add gulp-paths-to-file
bun add gulp-paths-to-file
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-06-26 |
| First published | 2019-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 21.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Victor Queiroz |
| Maintainers | victorqueiroz |

## Links

- npm: https://www.npmjs.com/package/gulp-paths-to-file
- npm.io page: https://npm.io/package/gulp-paths-to-file

## Dependencies (3)

- [glob](https://npm.io/package/glob.md) ^7.1.4
- [vinyl](https://npm.io/package/vinyl.md) ^2.2.0
- [through2](https://npm.io/package/through2.md) ^3.0.1

## Recent versions

- 1.0.0 (latest) — 2019-06-26

## README

# gulp-paths-to-file

Append/prepend transformed file paths to your file contents. See below some usage instructions.

## Installation

```
yarn add -D gulp-paths-to-file
```

## Usage

```ts
import filePaths from 'gulp-paths-to-file';
import gulp from 'gulp';

gulp.task('stylesheets', () => {
    return gulp.src('./stylesheets/app.scss')
            .pipe(filePaths('./src/**/*.{css,scss}', (file) => `@import "${file}";`))
            .pipe(gulp.dest('public'))
});
```

```ts
import {FilePathsPlugin} from 'gulp-paths-to-file';
import gulp from 'gulp';

gulp.task('stylesheets', () => {
    return gulp.src('./stylesheets/app.scss')
            .pipe(new FilePathsPlugin({
                pattern: './node_modules/bootstrap/scss/**/*.{scss}',
                mode: 'prepend',
                getContent: (file) => `@import "${file}";`
            }))
            .pipe(new FilePathsPlugin({
                pattern: './src/**/*.{css,scss}',
                getContent: (file) => `@import "${file}";`
            }))
            .pipe(gulp.dest('public'))
});
```

---
_Source: https://npm.io/package/gulp-paths-to-file · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
