![]() The only way around it is to re-save the file that does the or restart the process. If you change something in the imported file, node-sass won't recompile so you don't see your changes. I ran into a strange problem where if you use node-sass to watch a directory for some reason adding a new partial and the statements doesn't quite work as it should. I've tried to make them tight and focused, and if I get it right, they will hopefully be a refreshing change after gulp and grunt.Ī small tip for those who use sass and use node-sass (and npm scripts): A few more features (desktop notifications with Growl/notify, and script access to the list of changed files), and modd will be ready for me to ask for public feedback.īoth modd and devd are small, single-purpose tools written in Go, released as statically compiled binaries with no external dependencies. ![]() Many of the actions triggered by modd for front-end projects are precisely invocations of npm scripts as described in the article. Modd has already supplanted gulp entirely for many of my use cases, and has replaced supervisor and a bunch of other tools to boot. It's not quite ready to be announced yet, but I'm cooking up modd, a similarly focused tool for monitoring the file system and responding to changes ( ). I recently released devd, a small, dev-focused HTTP server with build-in livereload which has taken the place of gulp livereload and node-based dev servers for many of my projects ( ). I'm moving in a similar direction for similar reasons - but by shifting functionality out of the node ecosystem altogether. The new version has the added advantages of actually working, which the Gulp-based code used to but didn't any more, and of requiring a total of 0 changes since then to remain working, other than when the tools themselves changed their interfaces. Within 20 minutes we'd replaced well over 100 lines of Gulp code with about 10 one-liner CLI jobs that did all of the same things. ![]() In fact, those were the two examples I used when I put my foot down over build tools on one project I work on a little while back. I've also seen Gulp adapters for popular tools, such as ESLint, that break suddenly when something apparently unrelated in the NPM set-up is updated, even though ESLint itself also still runs just fine with a one-liner at the CLI. Unfortunately it embraces it so much that there are several different variations of connecting the parts together, and even then some important tools don't play very nicely with the rest of the Gulp framework.Ĭonsequently, it takes several lines of awkward boilerplate just to run a simple Browserify job that is a one-liner at the CLI. I'm sure they are as I still run into them even though I try to be very conservative these days, and I'm sure many of the complaints are from people who are better coders than I am.īut at least for myself, my Node.js work has become significantly more fun, and has involved significantly less 'grunt work' (heh) by simply avoiding the urge to add yet another dependency, API or tool "just because it's there". Now I'm not saying that the problems in the 'front-end ecosystem' aren't real. Gulp might be great in some cases, but why not use the 'npm script' approach until you need it? Installing packages for everything is seductive and just one command away, but it's not all that different from the cut-and-paste-from-stack-overflow programming that most of us learned to avoid. And while such behavior is human nature, and while it can be argued that this alone is a good reason to avoid such a restaurant in the first place, it can also be argued that much of the problem could be avoided by applying a little more restraint. As a result, you might get sick from overeating and from mixing food that you shouldn't mix. ![]() It feels a bit like going to an all-you-can-eat restaurant and eating both too much, and insisting on trying everything they have on the menu. It strikes me that this is really at the root of at least some of the 'front-end' problems we've been discussing in recent submissions.
0 Comments
Leave a Reply. |