Skip to content

Instantly share code, notes, and snippets.

@gampleman
Last active August 29, 2015 14:07
Show Gist options
  • Save gampleman/1f037d0ac56e569a9bee to your computer and use it in GitHub Desktop.
Save gampleman/1f037d0ac56e569a9bee to your computer and use it in GitHub Desktop.
JS Build tool of my dreams

Features desired

(but not necessarily found elsewhere)

Must Have

  1. Native Sourcemap support: JavaScript and CSS often need these for debugging purposses. Managing this manually tends to be a complete PITA. Also we want a way to globally turn these off, if we need better build time (see next).
  2. Native Watch & Serve: Setting up a dev environment should be straightforward, as the build tool should support mutliple environments, but also the abbility to watch source files and serve them from itself.
  3. Lazy: Shouldn't rebuild stuff if it doesn't need to.
  4. Native concurrency: Detect dependencies and parallelize automatically.
  5. Good error reporting: Build tools tend to suck in telling you what went wrong.

Nice to have

  1. Code over configuration: No more 1000LOC+ JSON files please!
  2. (optional) Opaque file management: I want to specify what files I want in my destination directory, but I don't want to manage intermediary files.
  3. Support for test-type tasks: Tests need to give users reasonable output, but want to run as fast as possible.
  4. Easy API, so plugins and whatnot can happen.
  5. Native Live-Reload: At least for styles.

Prior art

  • make: is lazy
  • grunt: ok API, best JS ecosystem
  • gulp: is fast, native concurrency (to an extent)
  • brocolli: has opaque filesystem, is somewhat lazy
@gampleman
Copy link
Author

@Ventajou
Copy link

Ventajou commented Oct 1, 2014

Some thoughts from setting up Gulp for SS:

  • SASS:
    • node-sass, based on libsass is really fast but does not support embedded sourcemaps
    • the ruby based sass is slow and always gave us trouble on different machines
    • no simple way to manage the lazy building because dependencies are handled by SASS...
  • JS:
    • sourcemaps work pretty well with Gulp, as long as each plugin supports it and so far they all do.
    • ordering the files before combining them is a bit of a pain because for example you need to declare an angular module before you can add controllers and stuff to it. At the same time I liked that I could do that myself instead of the tool forcing its way on me.
  • Livereload: the one we use in SS seems to work but it's a bit wonky, could just be me not fully grasping Gulp stuff though...

I think my biggest pain is Bower frankly. If someone could fix/replace bower but still use the bower.json files then that would be awesome.

@Ventajou
Copy link

Ventajou commented Oct 1, 2014

Ok one more thing: Gulp errors have reached the pinnacle of uselessness

@gampleman
Copy link
Author

OK, made a new version incorporating some of the feedback, and also indicating what features I consider essential for this project to have value and what I consider features that would make life easier, but aren't necessarily all that essential.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment