Skip to content

Adds a Polymer 3 application template to init.#134

Merged
bicknellr merged 25 commits intomasterfrom
init-3.x-application
Apr 17, 2018
Merged

Adds a Polymer 3 application template to init.#134
bicknellr merged 25 commits intomasterfrom
init-3.x-application

Conversation

@bicknellr
Copy link
Member

No description provided.

@bicknellr bicknellr requested a review from rictic April 13, 2018 20:03
* @polymer
*/
class <%= elementClassName %> extends PolymerElement {
static get is() { return '<%= elementName %>'; }
Copy link
Member Author

Choose a reason for hiding this comment

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

remove

}
}

window.customElements.define(<%= elementClassName %>.is, <%= elementClassName %>);
Copy link
Member Author

Choose a reason for hiding this comment

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

<%= elementClassName %>.is -> '<%= elementName %>'

"name": "<%= name %>",
<% if (description) { -%> "description": "<%= description %>",
<% } -%>
"main": "<%= name %>.js",
Copy link
Member Author

Choose a reason for hiding this comment

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

remove

.toPromise();
// TODO(#118): Use `polymer install` once it supports installing npm
// packages.
await exec('npm install', {cwd: dir});
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

@bicknellr bicknellr Apr 16, 2018

Choose a reason for hiding this comment

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

Nope, #136 safely rewrites the exec used here. :) (edit: ..and was merged.)


// TODO(#130): Add this back in when `polymer lint` has a Polymer 3
// option.
// await runCommand(binPath, ['lint'], {cwd: dir});
Copy link
Member Author

Choose a reason for hiding this comment

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

#142 added Polymer 3 linter rules.

@@ -0,0 +1 @@
bower_components/
Copy link
Member Author

Choose a reason for hiding this comment

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

-> /node_modules

{
"npm": true,
"moduleResolution": "node"
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Add lint rules: #142.

};

class Polymer3ApplicationGenerator extends ApplicationGenerator {
// TODO(yeoman/generator#1065): This is function not a no-op: Yeoman only
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, typo:

is function not -> is not

return super.initializing();
}

// TODO(yeoman/generator#1065): This is function not a no-op: Yeoman only
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

});
}

// TODO(yeoman/generator#1065): This is function not a no-op: Yeoman only
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@bicknellr bicknellr merged commit 1eeb3d0 into master Apr 17, 2018
@bicknellr bicknellr deleted the init-3.x-application branch April 17, 2018 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants