Skip to content

Distribute Grunt Workflow#8

Merged
lazd merged 1 commit intolazd:masterfrom
jpdevries:dist
Mar 3, 2016
Merged

Distribute Grunt Workflow#8
lazd merged 1 commit intolazd:masterfrom
jpdevries:dist

Conversation

@jpdevries
Copy link
Contributor

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

Assuming #6 is merged we'll be able to ignore "src" in bower.json so that only the new dist directory is fetched. Could also probably ignore the LICENSE as it will be prepended to dist/*.js

@jpdevries jpdevries mentioned this pull request Jun 27, 2015
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@jpdevries
Copy link
Contributor Author

@lazd
Copy link
Owner

lazd commented Mar 3, 2016

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.

lazd added a commit that referenced this pull request Mar 3, 2016
Distribute Grunt Workflow
@lazd lazd merged commit 0ef4855 into lazd:master Mar 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants