4 ms·
Grunt/Gulp are dead
- swah 12y agoBut preprocessors shall live long :(
- ubertaco 12y agoMore accurate title: "my personal use-case for grunt/gulp will no longer be necessary once HTTP2 is widely available." 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. We use grunt to, in order: 1. Package our Angular templates as a prebuilt module that populate's Angular's template cache, so we don't have to fetch them over the network at runtime and we're one step less susceptible to browser caching issues. 2. Compile our SASS to CSS 3. Compile our Typescript to Javascript 4. Concatenate and minify the resulting Javascript 5. Run unit tests 6. Add version+build numbers as query strings to our script tags (<script src="foo.js?v=1.25.11512"></script>) The concatenation+minification is the last-step implementation detail. But just having server push (which, by the way, your very short blurb doesn't explain or even mention) gives us only one arguably-smaller piece of our usecase for grunt. So yeah, not dead. Not even close.
- seasoup 12y agoBash scripts can do 2-6 as well, probably #1 as well. Most of these use cases for grunt are one line of bash code. Bash is a pain to write, though so is grunt.
- ubertaco 12y agoAnd for our Windows developers? My team is mixed: half OSX, half Windows. Should we maintain two separate scripts for each step and have our (repeatable) build process platform-detect and run the correct script?
- acdlite 12y agoI 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'm very happy with it. Got livereload (hot reload) working and everything, and you can always write a Bash/Node/whatever script and run it from make if you need to. Example Makefile with Babel, nodemon, mocha, webpack, React, and React Hot Loader: https://github.com/acdlite/flummox-isomorphic-demo/blob/master/Makefile https://github.com/acdlite/flummox-isomorphic-demo/blob/mast...