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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Grunt/Gulp are dead

10 点作者 csantini大约 10 年前

3 条评论

ubertaco大约 10 年前
More accurate title: &quot;my personal use-case for grunt&#x2F;gulp will no longer be necessary once HTTP2 is widely available.&quot;<p>As for my team, we use SASS to add enhanced featuresets to CSS (like variables, functions, and mixins), Typescript to add compile-time typechecking to our rather-large SPA codebase, and yes, we do concatenate+minify our transpiled Typescript.<p>We use grunt to, in order:<p>1. Package our Angular templates as a prebuilt module that populate&#x27;s Angular&#x27;s template cache, so we don&#x27;t have to fetch them over the network at runtime <i>and</i> we&#x27;re one step less susceptible to browser caching issues.<p>2. Compile our SASS to CSS<p>3. Compile our Typescript to Javascript<p>4. Concatenate and minify the resulting Javascript<p>5. Run unit tests<p>6. Add version+build numbers as query strings to our script tags (&lt;script src=&quot;foo.js?v=1.25.11512&quot;&gt;&lt;&#x2F;script&gt;)<p>The concatenation+minification is the last-step implementation detail. But just having server push (which, by the way, your very short blurb doesn&#x27;t explain or even mention) gives us only one arguably-smaller piece of our usecase for grunt.<p>So yeah, not dead. Not even close.
评论 #9158143 未加载
acdlite大约 10 年前
I went from grunt to gulp because of streams, then I went from gulp to make because of Unix. Takes some getting used to, but I&#x27;m very happy with it. Got livereload (hot reload) working and everything, and you can always write a Bash&#x2F;Node&#x2F;whatever script and run it from make if you need to.<p>Example Makefile with Babel, nodemon, mocha, webpack, React, and React Hot Loader: <a href="https://github.com/acdlite/flummox-isomorphic-demo/blob/master/Makefile" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;acdlite&#x2F;flummox-isomorphic-demo&#x2F;blob&#x2F;mast...</a>
swah大约 10 年前
But preprocessors shall live long :(