Skip to content

Instantly share code, notes, and snippets.

@OliverJAsh
Last active August 29, 2015 14:09
Show Gist options
  • Save OliverJAsh/9d964d5f53491295cfd0 to your computer and use it in GitHub Desktop.
Save OliverJAsh/9d964d5f53491295cfd0 to your computer and use it in GitHub Desktop.
Build tool requirements

Given a complex dep graph, produce the defined output whilst demonstrating the following capabilities:

  • Intelligent watch. When building a Sass file, e.g. main.scss, the build tool should rebuild if I change any of the files in the dependency graph (e.g. main.scss using Sass’ @import to pull in foo.scss))
  • Piping source maps. E.g.: main.js -> uglify -> concat with foo.js -> bar.js. The output file, bar.js, should have a source map that maps back to main.js
  • Caching. E.g.: main.js -> uglify -> concat with foo.js -> bar.js. Since the last build, foo.js has changed but main.js has not. The build tool should re-use the previous uglify result.

The build tool can be reviewed by the config necessary for achieving the above. Perhaps you could achieve all of these with the naïvest of build tools, but in my opinion, the best tool will have the simplest result: a demonstration of all of the above without any config.

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