balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.82k stars 1.95k forks source link

Grunt Misusing Logging System #1563

Closed robertmain closed 8 years ago

robertmain commented 10 years ago

Grunt seems to be misusing the logging system to show deprecation warnings for SASS compilation(ie: calling sails.log.error rather than sails.log.warn). I would fix it myself and send a pull request, but I can't find out where it's taking place. Apologies if this is the wrong place to file this issue.

mikermcneil commented 10 years ago

@robertmain ah- it's not Grunt's fault, it's mine... sort of. The weird thing is, at least as of 6 months or so ago, Grunt didn't have much of a programmatic api, so we're manually scraping the console output from the child process to try and guess the situation. See: https://github.com/balderdashy/sails/blob/master/lib/hooks/grunt/index.js#L84

Would you mind giving this a go on the edge version? I did some work improving this recently

robertmain commented 10 years ago

Cool. I'll throw it up into a VM and give it a go. I'll let you know how it does.

robertmain commented 10 years ago

I tried the edge version and I can confirm that this is still happening..

gtg092x commented 10 years ago

Any update or direction on this? This is effecting some of my build scripts by forcing an exit due to the error.

CWyrtzen commented 10 years ago

@robertmain @gtg092x sorry for the delay in following up with this. We will have someone take a look and update this issue. Thanks for bringing it to our attention.

jpwilliams commented 9 years ago

Yo folks. Any update on this?

mikermcneil commented 9 years ago

@tjwebb @sgress454 @irlnathan @particlebanana @rachaelshaw @loicsaintroch @jpwilliams @gtg092x @robertmain hey guys, here's what's up as far as I see it:

The Grunt hook currently sniffs out how serious a particular log looks by sniffing stderr and stdout from the childproc using a regexp. It does this because this is the best way Grunt has (at least the version we're using) to access output programmatically (i.e. to avoid spewing logs all over the place) Undoubtedly this is where everyone chimes in about gulp :p

I need your help:

1) What do you want to see in the future out of grunt/gulp support? (i.e. please don't tell me which one you like better-- rather, what do you need for the stuff you're working on?) 2) What grunt/gulp modules do you use most often? LESS? SASS? Linker? live reload? etc.

Thank you!

robertmain commented 9 years ago

I would really like gulp support in the future and I actually currently have a gulp setup that I was planning to port to sails at some point or submit a pull request for. I'm currently cutting my teeth on SASS and native support for this in Sails would be great. In particular - support for the ability to swap SASS "frameworks" (like bourbon, compass etc) in and out using bower(you'll notice this problem is already solved in the bitbucket repo I linked earlier) as I don't actually care for Compass and prefer Bourbon instead.

I hope that constitutes a useful answer :)

ghost commented 9 years ago

I almost use SASS modules .but i dont know about future. becaues every time is maybe that one person break rules and introduce a amazing thing that is better than grunt/gulp.:-)

loicsaintroch commented 9 years ago

Sails tried for a long time to take care of the front-end workflow with some default Grunt tasks, pipeline and template engines. This is great if you focus on it but this is not the case here. In my opinion, Sails shouldn't take care of the front-end at all. Every front-end developer has their own preferences and they will never be happy with a default workflow.

robertmain commented 9 years ago

... Actually, I think I'm inclined to agree with @loicsaintroch. Maybe sails could ship(pun not intended) with NO frontend asset pipeline at all and then have optional node packages that you can install to set sails up for gulp/grunt/brocolli/whatever

mikermcneil commented 9 years ago

@robertmain @loicsaintroch @masumeEbhami thanks for the feedback guys. I've heard the sentiment before and tend to agree-- it would be best if we got out of your way altogether and shipped a lighter version of Sails. Lots of advantages here outside of just Grunt, imo, that we ought to discuss somewhere else.

Anyways, all that said, many folks come to the framework expecting to find some kind of solution for the asset pipeline, so we want to make it easy to install. I have some ideas here but want to get more feedback from everyone first, if you'd be so kind :)

Quick aside-- just want to point out that @rwhitmire did some great work on linker to make it more flexible. i.e. goal is to remove the need for pipeline.js.

CWyrtzen commented 9 years ago

Any more feedback here?

robertmain commented 9 years ago

It would be great to have grunt removed by default and just have a generator command for putting it back(for folks that want the default workflow)

Karnith commented 8 years ago

I agree, then gulp could be implemented for those that want it. I've created a machine pack in the meantime that could possible be used as an example of this with a toggle to switch between gulp and grunt. https://github.com/Karnith/machinepack-sailsgulpify

sailsbot commented 8 years ago

Thanks for posting, @robertmain. I'm a repo bot-- nice to meet you!

It has been 30 days since there have been any updates or new comments on this page. If this issue has been resolved, feel free to disregard the rest of this message. On the other hand, if you are still waiting on a patch, please:

Thanks so much for your help!