Conversation
There was a problem hiding this comment.
I'm not a big fan of committing built files to the repo, it makes diffs for PRs ugly and bloats the history.
I haven't done enough with bower to know if it's simple to do, but is there a way we can only run the build when we're publishing and not commit the output to master, maybe in a separate branch?
There was a problem hiding this comment.
generally bower packages have a dist folder idea being everything else is ignored and just that is fetched. If people want to fetch everything, or the src folder too, then they use bower exportsOverride to define what gets pulled.
I've never heard of anyone using a separate branch for releases. That seems to be what tags are for...
As far as PRs, you can ignore anything in the diffs directory. Remember those are slave files. Even if there is a conflict on a dist file, Just make sure the source files look ok, merge them if needed, and rebuild.
I guess you could say a src/dest workflow "bloats the history", but is the current method of serving un-minified assets not a bloat on bandwidth? The minified file is 33% smaller.
Aside from optimization, this workflow is proposed so that the repo observes it's own license. Note that the files in the dist/ directory have the required credits.
new grunt uglify task builds a beautified version of the shim along with a minified version in a new dist/ directory and adds the LICENSE header to each grunt uglify is triggered by grunt watchFiles:src consider: cachebusting dist/*.js file names with a version number ie: dist/scopedQuerySelectorShim.1.0.0.min.js adding space
|
added space and squashed commits https://github.com/jpdevries/scopedQuerySelectorShim/blob/dist/gruntfile.js#L9 |
|
I'm going to go ahead and merge this as it sounds like it really helps the Bower workflow, then let's get #6 in. |
new grunt uglify task builds a beautified version of the shim along
with a minified version in a new dist/ directory and adds the
LICENSEheader to each
grunt uglify is triggered by
grunt watchFiles:srcconsider:
cachebusting dist/*.jsfile names with a version number ie:dist/scopedQuerySelectorShim.1.0.0.min.jsAssuming #6 is merged we'll be able to ignore
"src"inbower.jsonso that only the newdistdirectory is fetched. Could also probably ignore theLICENSEas it will be prepended todist/*.js