Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a Polymer 3 application template to init. #134

Merged
merged 25 commits into from
Apr 17, 2018
Merged

Conversation

bicknellr
Copy link
Member

No description provided.

* @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.

@@ -116,4 +116,65 @@ export function createApplicationGenerator(templateName: string):
'Check out your new project README for information about what to do next.\n');
}
};

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