rschmukler / gulp-insert

string mutation library for gulp
MIT License
61 stars 6 forks source link

Add access to file name #4

Closed yuri-karadzhov closed 10 years ago

yuri-karadzhov commented 10 years ago

Sometime it is important to have an access to file name to append/prepend this data to file e.g.

// name/of/the/file.js
... file content ...

Proposed syntax:

insert.append(function(path) {
  return '//' + path.baseName;
})
rschmukler commented 10 years ago

@yuri-karadzhov I'm open to a PR adding this. Please make sure that the string syntax is still supported, but I could definitely see this being useful.

yuri-karadzhov commented 10 years ago

Solved by PR #5

tomByrer commented 10 years ago

Thanks, helpful for concocting JS & CSS!