TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

No more `grunt watch` – faster builds with the Broccoli asset pipeline

131 点作者 joliss超过 11 年前

16 条评论

munificent超过 11 年前
This is slightly related and I don&#x27;t want to sound like I&#x27;m trying steal its thunder, because this looks really cool. I work on the asset pipeline that comes with the Dart SDK. It has many of the same principles as these.<p>Any transformation step can read in many input files and produce many output files. The built-in dev server tracks the entire asset dependency graph and only rebuilds the assets that are dirtied by a source file changing.<p>We have a plug-in system, and it&#x27;s built on top of the same package management system that the SDK uses, so you can get transformer plug-ins as easily as you can get any other dependency.<p>We still have a lot of work to do to fully flesh things out, but it already does a lot, including supporting complex scenarios like transformers whose own code is the output of a previous transformer.<p>More here: <a href="https://www.dartlang.org/tools/pub/assets-and-transformers.html" rel="nofollow">https:&#x2F;&#x2F;www.dartlang.org&#x2F;tools&#x2F;pub&#x2F;assets-and-transformers.h...</a>
评论 #7254221 未加载
评论 #7255882 未加载
JangoSteve超过 11 年前
<i>Broccoli is a new build tool. It’s comparable to the Rails asset pipeline in scope, though it runs on Node and is backend-agnostic.</i><p>This first line is a little disingenuous. Technically, it&#x27;s not backend-agnostic, since it depends on Node being installed on the backend (in the same way that Sprockets [1] depends on Ruby). The Rails asset pipeline is a framework-specific integration of Sprockets. In much the same way, you could more closely integrate Broccoli with Rails if you wanted and call it a new Rails asset pipeline.<p>The project itself looks great, just the first line was confusing since they started the docs off by comparing apples to oranges.<p>A better comparison would probably be, &quot;It&#x27;s comparable to Sprockets (which powers the Rails asset pipeline), but runs on Node instead of Ruby.&quot;<p>[1] <a href="https://github.com/sstephenson/sprockets" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sstephenson&#x2F;sprockets</a>
评论 #7254893 未加载
评论 #7257917 未加载
评论 #7254640 未加载
Nemcue超过 11 年前
Not often I see tools announced with such a thoroughly researched article. Great stuff!<p>I guess the problem these build tools are facing is the amount that people have invested in Grunt. There are just &#x2F;so&#x2F; many grunt tasks at this point.
评论 #7254049 未加载
评论 #7253745 未加载
评论 #7253952 未加载
评论 #7255417 未加载
评论 #7254353 未加载
iamstef超过 11 年前
Having used literally ever alternative, Broccoli has been a joy to use so far, can wait to port all my projects to it.<p>It manages complexity really well. I have thrown many known failure scenarios at it, and it handled them all without a hitch.
评论 #7253831 未加载
评论 #7253985 未加载
mikewhy超过 11 年前
Not sure what the pros are against Brunch. The author states:<p>&gt; Brunch also tries to do partial rebuilding rather than caching; see section “Caching, Not Partial Rebuilding”<p>But the end of that section seems to imply that it&#x27;s still something that needs to be implemented per-plugin:<p>&gt; Plugins that map files n:1, like Sass, need to be more careful about invalidating their caches, so they need to provide custom caching logic.<p>I&#x27;m excited to see what comes of it, but still prefer the idea of simply running `npm install (sass|jade|less|stylus|coffee-script)-brunch --save`
matteodepalo超过 11 年前
I&#x27;m happy to see this reach beta version, it&#x27;s a great step in the right direction. Grunt is too generic as a tool and we&#x27;ve all seen Gruntfiles reach enormous lengths, to a point when it&#x27;s really hard to figure out what is processing what.<p>One thing that has room for improvement though is the syntax, which in my opinion doesn&#x27;t reveal the intention behind some methods and is a bit too coupled with the implementation. What does `makeTree(&#x27;lib&#x27;)` mean? If it&#x27;s taking a folder and its files then why not rename it to something like `broccoli.requireFolder(&#x27;lib&#x27;)`? Also another thing that might improve usability would be chaining compilers instead of calling them directly with the tree as parameter.<p>These are just minor things anyway, I&#x27;m sure the library will improve over time. Congrats joliss, great fan of your work!
clhodapp超过 11 年前
I want to note that this headline is a wonderfully hilarious if read without js-programmer context.
评论 #7254214 未加载
jonaldomo超过 11 年前
I would like to request renaming brocollifile.js to brocolli.js. I believe brocollifile.js is too long for a standard build file name. Gruntfile.js always bothered me. Compare it to pom.xml, build.xml, package.json and it feels out of place.
评论 #7254129 未加载
评论 #7254094 未加载
评论 #7255092 未加载
sonnym超过 11 年前
This looks like a solid project.<p>I want to mention mincer[1], which I have used in the past for compiling assets, and it has been an entirely painless process. Definitely take a look at it as an alternative, which has been around longer and has seen assistance from the folks behind sprockets[2] (according to the README) for creating a similar API.<p>1. <a href="https://github.com/nodeca/mincer" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nodeca&#x2F;mincer</a> 2. <a href="https://github.com/sstephenson/sprockets" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sstephenson&#x2F;sprockets</a>
ChikkaChiChi超过 11 年前
There are at least 5 separate build tools referenced in these comments.<p>Obligatory XKCD: <a href="https://xkcd.com/927/" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;</a>
Natsu超过 11 年前
The fun part is when your non-technical coworkers ask what you&#x27;re reading so intently and you read something like this to them with no context: &quot;Run broccoli serve to watch the source files and continuously serve the build output on localhost. Broccoli is optimized to make broccoli serve as fast as possible, so you should never experience rebuild pauses.&quot;
Kiro超过 11 年前
What&#x27;s the difference between a build tool and a task runner?
评论 #7254409 未加载
SippinLean超过 11 年前
Can someone please build a Grunt GUI that I can drag-and-drop project folder to, to watch multiple folders?<p>Prepros is the closest software out there now, but it&#x27;s not extensible like Grunt.
malandrew超过 11 年前
Is this a beta build system like tup? Sounds like it. I ask because I&#x27;ve recently begun work on the same.
jakswa超过 11 年前
Anyone know of any resources for writing plugins?
评论 #7255117 未加载
stefan_kendall超过 11 年前
Yet ANOTHER build tool. I&#x27;ve started placing bets on when repositories will flip to NEW-HOTNESS-BUILD-TOOL at the cost of actual product development time.<p>Engineers will constantly run toward shiny baubles at the expense of everything else.