Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Clarify --add-prefetch build flag #510

Merged
merged 3 commits into from
Dec 20, 2016
Merged

Conversation

FredKSchott
Copy link
Contributor

Clarified this build flag since a lot of people (myself included) weren't sure what it was doing. Also confirmed it's still working as intended.

/cc @justinfagnani

@@ -34,7 +34,7 @@ const buildDirectory = 'build/';

export interface BuildOptions {
swPrecacheConfig?: string;
insertDependencyLinks?: boolean;
prefetchDepedencies?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

"insert" seemed meaningful here, in that the effect of this flag is to insert prefetch link tags, the effect isn't to do prefetching.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, changed naming to addPrefetchLinks to be in line with the cli flag.

description: 'Flatten dependency tree downloads by inserting ' +
'additional `<link rel="prefetch">` tags into ' +
'entrypoint and `<link rel="import">` tags into fragments and shell.'
description: 'Add dependency tree prefetching by inserting ' +
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd remove "tree", we haven't used the term "dependency tree" before. Maybe:

"Enable dependency prefetching by inserting..."

@@ -45,11 +45,12 @@ export class BuildCommand implements Command {
'used for service worker generation.'
},
{
name: 'insert-dependency-links',
name: 'add-prefetch',
Copy link
Contributor

Choose a reason for hiding this comment

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

similar to the above comment, I think "insert" is meaningful here. Maybe insert-prefetch-links?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer the shorter add-prefetch when it comes to command line args. And insert always felt like it was inserting something new into my application while add feels like it's adding a new feature/ability to my application. So I prefer as-is, but happy to make the change if you feel strongly.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not really concerned about long flag names for things that'll hopefully be in a config file, if they're more descriptive. I think insert-prefetch-links is the most clear name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fine by me, I'll make the change

@FredKSchott
Copy link
Contributor Author

@justinfagnani name changed, PTAL

Copy link
Contributor

@justinfagnani justinfagnani left a comment

Choose a reason for hiding this comment

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

Thanks!

@FredKSchott FredKSchott merged commit 38023fa into build-flag-bundle Dec 20, 2016
FredKSchott added a commit that referenced this pull request Dec 20, 2016
* rename confusing --insert-dependency-links flag to --prefetch-dependencies

* rename prefetchDepedencies to addPrefetchLinks

* rename to insert-prefetch-links
FredKSchott added a commit that referenced this pull request Dec 20, 2016
* Convert build to single build stream, add bundled flag

* Clarify `--add-prefetch` build flag (#510)

* rename confusing --insert-dependency-links flag to --prefetch-dependencies

* rename prefetchDepedencies to addPrefetchLinks

* rename to insert-prefetch-links

* respond to review comments
@justinfagnani justinfagnani deleted the build-flag-prefetch branch January 4, 2017 17:34
FredKSchott added a commit that referenced this pull request Jan 31, 2017
* Convert build to single build stream (#509)

* Convert build to single build stream, add bundled flag

* Clarify `--add-prefetch` build flag (#510)

* rename confusing --insert-dependency-links flag to --prefetch-dependencies

* rename prefetchDepedencies to addPrefetchLinks

* rename to insert-prefetch-links

* respond to review comments

* Cleanup how optimize streams work, in preparation for babel stream (#524)

* Cleanup how optimize streams work, in preparation for babel stream

* death to lets

* redeisn optimize interface

* pull stream piping into a helper function

* rollback cli dash-case naming

* remove unused gulpif

* update buildoptions to match planned polymer.json options

* add babel to build stream, replace uglify with babili es2015 minifier (#525)

* Cleanup how optimize streams work, in preparation for babel stream

* add babel to build stream

* death to lets

* redeisn optimize interface

* pull stream piping into a helper function

* rollback cli dash-case naming

* replace uglify with babili

* fix bad merge conflict

* fixup js-minify description

* remove unused gulpif

* update buildoptions to match planned polymer.json options

* remove old comment

* let to const

* add service worker flag to build command (#534)

* add service worker flag to build command

* reword flags and descriptions

* quick reword again

* get rid of skiplibcheck

* debug to info

* Add support for polymer.json build configurations (#545)

* Add support for named build permutations

* respond to PR feedback

* add comments on build function

* update logging to be cleaner

* update for new naming rules

* update polymer-project-config to v1.2.0

* Update CHANGELOG.md

* update polymer-build version, update shrinkwrap
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants