StoryCloud/webkit-assign

bower.json

Closed this issue · 6 comments

Thank you very much for the fix. It would be really cool though, if you could provide also a bower version.

This is a command-line utility, unsuitable for use in browsers. Why would you want this on bower when you could install it via npm?

He's probably looking for a copy of Angular after it's been run through it. We don't want to get in the business of maintaining third-party libraries, but perhaps we could provide an example of grunt / gulp integration?

Yes that's it. Sorry I misunderstood how this is supposed to work. Makes sense not to get in the trouble of maintaining third party libraries.

The current programmatic interface is geared towards CLI use. For easier integration with Grunt or Gulp, users will want to specify the output directory and filename. We could update the programmatic interface to return a transform stream which pipes in a file's contents completely and then pipes out patched code.

This would be really great!

We've added a streams and gulp interface, and released these in 1.2.0. You should be able to use these in your build pipeline to automatically fix your code, without needing to maintain separate versions of e.g. angular.js.

var fs = require('fs');
var webkitAssign = require('webkit-assign');
fs.createReadStream('bower_components/angular/angular.js')
    .pipe(webkitAssign())
    .pipe(fs.createWriteStream('build/scripts/angular.js'));
var gulp = require('gulp');
var webkitAssign = require('webkit-assign/gulp');
gulp.src('bower_components/angular/angular.js')
    .pipe(webkitAssign())
    .pipe(gulp.dest('build/scripts'));