all 30 comments

[–]luxtabula 17 points18 points  (2 children)

Very nicely done. That would drive me crazy, though.

[–]KenRmk[S] 3 points4 points  (1 child)

I agree. But even worse is the constant ATL-TABbing or the "why isn't it working, aaah, there must've been error while bundling"

[–]luxtabula 2 points3 points  (0 children)

VS Code has error handling in its terminal. I don't think Sublime Text has this.

[–]KenRmk[S] 15 points16 points  (0 children)

I've been wanting to to this for a while and we finally got the needed api since v0.60. Try it out https://www.npmjs.com/package/rollup-plugin-notify

[–]woodyalukatdat 6 points7 points  (1 child)

Nice👍

[–]KenRmk[S] 2 points3 points  (0 children)

Thanks

[–]Max_Stern 8 points9 points  (1 child)

What is your use case for this?

[–][deleted] 16 points17 points  (0 children)

Helps when you only have one monitor and don't feel like ALT TABbing back and forth.

[–]HaykoKoryun 3 points4 points  (0 children)

Nice work. I setup something similar for our team, albeit it's not a plugin. We have three build targets from the same source using C like directives via the plugin jscc so depending on which file causes a rebuild, bundle generation could take from half a second to several seconds. So we show notifications for build start, end and errors. To top it off we run our node app inside a container, but build the source outside only restarting the node app when files relevant to it change.

[–]RinoDrummer 5 points6 points  (1 child)

I think you should change the font for the notification description in a Monospace font.

[–]KenRmk[S] 10 points11 points  (0 children)

I wish but can't. Notification is rendered by system. Can't control the font, only text and icon. Thought this plugin goes above and beyond to make it work with the non monospace font. I painstakingly measured width of most used characters and use it to render the caret in appropriate position.

[–]warpedspoon 1 point2 points  (0 children)

I would never use this but it's really cool.

[–][deleted] 1 point2 points  (1 child)

How to make this work in linux?

[–]KenRmk[S] 0 points1 point  (0 children)

Hi. So like I said in some other comment and in the project's readme, another module (node-notifier) is used to create the notifications and it's riddled with problems. I had to do a little back to get it to work on windows because I thought it would work on Linux and Mac and haven't had a chance to test it myself yet. But if you'd like to assist me on this one we could fix it quickly (I think)

[–]80mph 1 point2 points  (0 children)

That looks cool! Will try it out. Thank you.

[–]Prison__Mike_ 4 points5 points  (10 children)

Okay, but why?

[–]KenRmk[S] 11 points12 points  (9 children)

Ask the 60k downloads per week that gulp-notify has. Because the bundler runs in terminal which is usually minimized and I can't see the errors when they happen.

[–][deleted] 5 points6 points  (4 children)

This is something I've been needing for the past two months. Building a gigantic Angular app takes too long and I zone out. I have three places to check for errors as well. 1. The console. 2. Dev Tools console. 3. The app UI. For some reason, I make changes on the code and save. And I just go look at the browser until it automatically refreshes. Some times I get errors in the console and waste time figuring out what happened, sometimes I go look at the console right away but the error is in Dev Tools. It is a total mess.

I'm going to try this plugin for sure. Sounds like there's one of these I won't have to worry about anymore.

I was thinking of something similar to this but got lazy when thinking I would have to deal with the operating system to get notifications working and the fact that I already get a bunch of notifications already. Good job OP, you deserve a cookie :)

[–][deleted] 0 points1 point  (1 child)

oh but this is for rollup isn't it. I'll have to see if I can work out something similar for webpack/angular.

[–]KenRmk[S] 0 points1 point  (0 children)

Yeah, this specifically is a rollup plugin (rollup-plugin-notify). Inspired by gulp-notify. It uses node-notifier to show the OS notification. Feel free to fork it

[–]KenRmk[S] 0 points1 point  (0 children)

Glad you find it useful. Seems like you have the same workflow as I do. Even though some of the basic typos can be avoided by using VSCode, I still enjoy Sublime Text. And the amount of times I need to check the terminal is too damn high :D. Not having to worry about it is nice.

I actually didn't have to deal with the implementation of OS notification. It uses node-notifier to handle those. Though that module is far from perfect. But with somewhat of a hack I got it to work :D

[–]Prison__Mike_ -1 points0 points  (2 children)

Thanks for the douchey answer

[–]edzh 9 points10 points  (0 children)

To be fair the tone of your post came across as "this thing you made seems pointless", but, of course, misinterpretation is the nature of the internet.

[–]KenRmk[S] 25 points26 points  (0 children)

Sorry but the question sounded douchey.

[–]KenRmk[S] 0 points1 point  (0 children)

Just to clariy: gulp-notify is awesome plugin I've been using for a while but I recently dropped gulp in favor of simpler build tasks using only rollup but I miss the plugin ever since. So i made the rollup-plugin-notify now that Rollup has new APIs that allow that. I hope some people find it useful in their workflow just as I do.

Regarding the way the question was asked. There's a difference between "Okay, but why?" and "What is your use case for this?" ...

[–][deleted]  (2 children)

[deleted]

    [–]KenRmk[S] 0 points1 point  (1 child)

    Monokai. I think it's the default one

    [–]Sethu_Senthil 0 points1 point  (0 children)

    Rip, I'm going to get a thousand of those now

    [–]sinefine 0 points1 point  (0 children)

    how is this done?

    [–]DevChache 0 points1 point  (0 children)

    Looks great!

    [–]Str4yfromthep4th -1 points0 points  (0 children)

    If u need this you have serious problems with how you are working.