JohnyDays / gulp-filenames

Filename gathering plugin for gulp
MIT License
10 stars 5 forks source link

Update gulp reference #10

Closed jp7677 closed 8 years ago

jp7677 commented 8 years ago

Hi there,

thanks for your work on gulp-filenames, really useful. Could you please update yout package.json and update your reference to gulp to allow the latest version? So you could either use "~3.9.1" or "^3.8.5". Thanks!

bmacnaughton commented 8 years ago

Johny - I made these changes and pushed my commit here. Publish to npm if you're comfortable with them.

JohnyDays commented 8 years ago

All tests seem to be passing, i'll publish in a minute.

JohnyDays commented 8 years ago

Published as 3.8.5 to match gulp version, thanks @bmacnaughton !

jp7677 commented 8 years ago

@bmacnaughton, @JohnyDays thanks a lot for your fast response and work on this one! I'm embarrassed to say, but unfortunately your gulp-util reference is also slightly out-of-date, see https://david-dm.org/JohnyDays/gulp-filenames. Care to update this one too? Sorry for not mentioning this earlier, I have seen it just now.

PS: On npm I'm seeing version 4.0.0 as the latest, see https://www.npmjs.com/package/gulp-filenames. Should I ignore that version?

bmacnaughton commented 8 years ago

@jp7677 - OK, updated. I'd never paid attention to the dependencies badge. Now that you've pointed it out I'll add it to my own project.

I don't know the reason for the 4.0.0 note on npmjs.com.

jp7677 commented 8 years ago

@bmacnaughton Thanks a lot!

bmacnaughton commented 8 years ago

@jp7677 - how do you use gulp-filenames? I started using it to collect files that go into <script> tags. But for debugging I wanted individual files, for testing concatenated and/or minimized files. So I collect the filenames at the end of the gulp tasks that process those files and insert the appropriate names into the <script> tags (or sometimes into PHP code that does the insertion).

jp7677 commented 8 years ago

@bmacnaughton See e.g. https://github.com/jp7677/hellocoreclr/blob/master/ui/build/bundle/css.js, https://github.com/jp7677/hellocoreclr/blob/master/ui/build/bundle/systemjs.js and https://github.com/jp7677/hellocoreclr/blob/master/ui/build/bundle/html.js. Gulp-filename helps me to inject the filenames from my bundles into the intex.html after changing the bundle filename using gulp-rev. It works pretty cool.

bmacnaughton commented 8 years ago

@jp7677 Thanks. I'm always curious how things are being used. It's similar to my uses - the output filename(s) are not known as a result of using rev(). Mine aren't known because I only concat and minify (with .min.* rename) in production.

jp7677 commented 8 years ago

Hi @JohnyDays, may I ask to publish version 3.8.6 to npm? That should finally resolve some "npm ERR! extraneous" warnings due to outdated dependencies when doing npm list. Thanks in advance!

JohnyDays commented 8 years ago

Sorry about that, wasn't home this weekend. I'll publish it now! Since we published a version as 4.0.0, we should probably increase that one or it'll cause confusion.

I think that happened when I published some minor breaking changes, and thought it'd be appropriate to bump the major. But I didn't push that commit to github! My bad.

I'll publish this change as 4.0.1 so that our history doesn't look wonky

jp7677 commented 8 years ago

Thanks a lot! Looks a lot better!

jp7677 commented 8 years ago

Though after a fresh npm install I'm still seeing:

npm ERR! extraneous: coffee-script@1.10.0 /home/.../node_modules/gulp-filenames/node_modules/coffee-script
npm ERR! extraneous: coveralls@2.11.3 /home/.../node_modules/gulp-filenames/node_modules/coveralls
npm ERR! extraneous: event-stream@3.3.1 /home/.../node_modules/gulp-filenames/node_modules/event-stream
npm ERR! extraneous: gulp@3.8.11 /home/.../node_modules/gulp-filenames/node_modules/gulp
npm ERR! extraneous: mocha@2.2.5 /home/.../node_modules/gulp-filenames/node_modules/mocha
npm ERR! extraneous: should@2.1.1 /home/.../node_modules/gulp-filenames/node_modules/should

when doing npm list. Any ideas? I thought these were caused due to outdated dependencies, but this is no longer the case.

JohnyDays commented 8 years ago

That just means you have some dependencies in your node_modules that aren't declared in your package.json. If you don't need them you can just run npm prune to delete them

jp7677 commented 8 years ago

ok, npm prune works indeed, thanks. Though I do have mocha, gulp etc in my packages.json (https://github.com/jp7677/hellocoreclr/blob/master/ui/package.json)... Eventually I should read some more about the npm internals ;)

JohnyDays commented 8 years ago

I just noticed, in the logs it indicated /home/.../node_modules/gulp-filenames/node_modules/mocha as the origin path for the error, did you clone gulp-filenames into your node_modules and npm install by any chance? That would explain the extra modules inside gulp-filenames's module folder

jp7677 commented 8 years ago

No, I even tried a fresh start with rm -Rf node_modules npm cache clean npm install

jp7677 commented 8 years ago

Just to be sure, I truncated the warning a little bit, I replaced my username/projectname etc with the three dots.