0.1.1 • Published 10 years ago

gulp-bower-dist v0.1.1

Weekly downloads
1
License
ISC
Repository
github
Last release
10 years ago

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:

<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.

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

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

The result?

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

Hooray!

0.1.1

10 years ago

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago