browserify-commit-sha
browserify transform for appending the latest git commit SHA
The output looks like this:
{{if!noif!tovar a=typeof require=="function"&&require;if!u&&areturn ;ifireturn ;var f="Cannot find module '"+o+"'";throw fcode="MODULE_NOT_FOUND"fvar l=no=exports:{};to0return noexports}var i=typeof require=="function"&&require;forvar o=0;o<rlength;o++;return s}1:{{ global__BROWSERIFY_META_DATA__GIT_VERSION = "c6541cbdf842e204fd2a958a28e83ba7be42f3c9";global__BROWSERIFY_META_DATA__CREATED_AT = "Sun Feb 15 2015 17:18:10 GMT-0500 (PET)"; 'use strict'; // this is the entry point file that you browserifiedvar x var y = // ...
Its a bit of a hack, but it works alright.
Requires node 0.12+ for execSync.