# gulp-bower-dist

> Fix bower_component paths for distribution

Latest version **0.1.1** (published 2014-07-30) · ISC license · 0 weekly downloads

## Install

```sh
npm install gulp-bower-dist
pnpm add gulp-bower-dist
yarn add gulp-bower-dist
bun add gulp-bower-dist
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2014-07-30 |
| First published | 2014-07-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Potch |
| Maintainers | potch |
| Keywords | gulp |

## Links

- npm: https://www.npmjs.com/package/gulp-bower-dist
- Repository: https://github.com/potch/gulp-bower-dist
- Issues: https://github.com/potch/gulp-bower-dist/issues
- npm.io page: https://npm.io/package/gulp-bower-dist

## Dependencies (3)

- [cheerio](https://npm.io/package/cheerio.md) ^0.17.0
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.0
- [event-stream](https://npm.io/package/event-stream.md) ^3.1.7

## Recent versions

- 0.1.1 (latest) — 2014-07-30
- 0.1.0 — 2014-07-30
- 0.0.3 — 2014-07-30
- 0.0.2 — 2014-07-30
- 0.0.1 — 2014-07-30
- 0.0.0 — 2014-07-30

## README

gulp-bower-dist
===============

When you use bower dependencies in your project, they look like this:

```
|- my-project
   |- bower_components
   |  |- thingy
   |     |- index.js
   |
   |- src
      |- mycode.html
```

And you use them like this:

```html
<script src="../bower_components/thingy/thingy.js"></script>
```

But when your project is itself a bower dependency, now things look like this:

```
|- bower_components
   |- thingy
   |  |- index.js
   |
   |- my-project
      |- src
         |- mycode.html
```

That kinda sucks. This plugin rewrites the URLs so they point to sibling dependencies properly.

```js
var bower = require('gulp-bower-dist');

gulp.src('mycode.html')
  .pipe(bower())
  .pipe(gulp.dist('dist'));
```

The result?

```html
<script src="../../thingy/thingy.js"></script>
```

Hooray!

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