3

We are currently building our frontend js codebase (angularjs) using nodejs with grunt, which seems to be a popular setup, but we are not happy with this solution. Does anyone have suggestions for a build setup for e.g. linting, minimizing our js, running less, etc (in addition to some custom steps for angular in general and for our application specifically) without using nodejs at all?

I would leave it at that to avoid starting a flamewar, but here are, for context, some of the shortcomings of the current setup in our view:

  • grunt does not have even the basic functionality of a 1970s build system, like automatically re-building only files that have been modified based on file modification time

  • npm is causing constant headaches running on our build servers at every build

jssebastian
  • 1,189
  • 1
  • 11
  • 12

1 Answers1

1

If grunt does not have even the basic functionality of a 1970s build system, why won't you use a 1970s build system then?

Just use make if that's what you're happy with. It still works fine. There's no reason not to use it if it you're satisfied with how it works.

rsp
  • 107,747
  • 29
  • 201
  • 177
  • Thank you. I am considering make, but was wondering about the JS-specific steps like minifying and linting. Right now I'm thinking of using make with google closure compiler for minifying and eslint (running in node but installed globally with npm install -g). Also, one good thing of grunt is watching files, which make does not natively do. – jssebastian Sep 20 '16 at 17:08
  • 2
    @jssebastian You can always use `while true; do make --silent; sleep 5; done` or something like that with make. You can run every command from make, including minification, linting etc. Maybe linting would be better with `make check` or `make test` but it's up to you to define all the targets. Actually make is much more powerful than most of people realize and its advantage is that it is cross platform, not only that it works everywhere but you can use it for every language. – rsp Sep 22 '16 at 11:43
  • A colleague put together a simple shell script based on inotifywait that will trigger make if there are changes but that probably only works under linux. – jssebastian Sep 27 '16 at 20:16