Permalink
Browse files

Use submodule for seed-element

  • Loading branch information...
1 parent cfa7cc2 commit e39af5eac4717596fefaad31c6da127f25cfe5bf @robdodson robdodson committed Jul 21, 2015
View
@@ -1,3 +1,6 @@
[submodule "app/templates/polymer-starter-kit"]
path = app/templates/polymer-starter-kit
url = https://github.com/PolymerElements/polymer-starter-kit.git
+[submodule "seed/templates/seed-element"]
+ path = seed/templates/seed-element
+ url = https://github.com/PolymerElements/seed-element.git
Submodule seed-element added at 7481fe
@@ -1 +0,0 @@
-bower_components
@@ -1,56 +0,0 @@
-# seed-element
-
-An element providing a starting point for your own reusable Polymer elements.
-
-
-## Dependencies
-
-Element dependencies are managed via [Bower](http://bower.io/). You can
-install that via:
-
- npm install -g bower
-
-Then, go ahead and download the element's dependencies:
-
- bower install
-
-
-## Playing With Your Element
-
-If you wish to work on your element in isolation, we recommend that you use
-[Polyserve](https://github.com/PolymerLabs/polyserve) to keep your element's
-bower dependencies in line. You can install it via:
-
- npm install -g polyserve
-
-And you can run it via:
-
- polyserve
-
-Once running, you can preview your element at
-`http://localhost:8080/components/seed-element/`, where `seed-element` is the name of the directory containing it.
-
-
-## Testing Your Element
-
-Simply navigate to the `/test` directory of your element to run its tests. If
-you are using Polyserve: `http://localhost:8080/components/seed-element/test/`
-
-### web-component-tester
-
-The tests are compatible with [web-component-tester](https://github.com/Polymer/web-component-tester).
-Install it via:
-
- npm install -g web-component-tester
-
-Then, you can run your tests on _all_ of your local browsers via:
-
- wct
-
-#### WCT Tips
-
-`wct -l chrome` will only run tests in chrome.
-
-`wct -p` will keep the browsers alive after test runs (refresh to re-run).
-
-`wct test/some-file.html` will test only the files you specify.
@@ -1,29 +0,0 @@
-{
- "name": "seed-element",
- "version": "1.0.0",
- "authors": [
- "Anonymous <anonymous@example.com>"
- ],
- "description": "An element providing a solution to no problem in particular.",
- "keywords": [
- "web-component",
- "web-components",
- "polymer",
- "seed"
- ],
- "main": "seed-element.html",
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/<USERNAME>/seed-element/",
- "ignore": [
- "/.*",
- "/test/",
- "/demo/"
- ],
- "dependencies": {
- "polymer": "Polymer/polymer#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "web-component-tester": "*"
- }
-}
@@ -1,36 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
- <title>seed-element Demo</title>
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../seed-element.html">
- </head>
- <body>
-
- <p>An example of <code>&lt;seed-element&gt;</code>:</p>
-
- <button>Say Something</button>
-
- <seed-element author='{"name": "Lord Meowser", "image": "http://placekitten.com/g/200/300"}' fancy>
- <h2>Hello seed-element</h2>
- </seed-element>
-
- <script>
- document.querySelector('button').addEventListener('click', function() {
- alert(document.querySelector('seed-element').sayHello('Hallo!'));
- });
- </script>
-
- </body>
-</html>
@@ -1,29 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
-<head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <script src="../webcomponentsjs/webcomponents-lite.js"></script>
- <link rel="import" href="../iron-component-page/iron-component-page.html">
-
-</head>
-<body>
- <!-- Note: if the main element for this repository doesn't
- match the folder name, add a src="&lt;main-component&gt;.html" attribute,
- where &lt;main-component&gt;.html" is a file that imports all of the
- components you want documented. -->
- <iron-component-page></iron-component-page>
-
-</body>
-</html>
@@ -1,149 +0,0 @@
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../polymer/polymer.html">
-
-<!--
-An element providing a solution to no problem in particular.
-
-Example:
-
- <seed-element></seed-element>
-
-@demo
--->
-<dom-module id="seed-element">
-
- <style>
- :host {
- display: block;
- box-sizing: border-box;
- }
-
- .author img {
- float: left;
- margin-right: 5px;
- max-height: 100px;
- max-width: 100px;
- }
- </style>
-
- <template>
- <h1>&lt;seed-element&gt;</h1>
- <content></content>
- <p class="author">
- <img src="{{author.image}}">
- Cheers,<br/>
- <span class="name">{{author.name}}</span>
- </p>
- </template>
-
-</dom-module>
-
-<script>
-
- Polymer({
-
- is: 'seed-element',
-
- properties: {
-
- /**
- * `fancy` indicates that the element should don a monocle and tophat,
- * while checking its pocket watch.
- */
- fancy: Boolean,
-
- /**
- * Describes the author of the element, but is really just an excuse to
- * show off JSDoc annotations.
- *
- * @type {{name: string, image: string}}
- */
- author: {
- type: Object,
- // Use `value` to provides a default value for a property, by setting it
- // on your element's prototype.
- //
- // If you provide a function, as we do here, Polymer will call that
- // _per element instance_.
- //
- // We do that to ensure that each element gets its own copy of the
- // value, rather than having it shared across all instances (via the
- // prototype).
- value: function() {
- return {
- name: 'Dimitri Glazkov',
- image: 'http://addyosmani.com/blog/wp-content/uploads/2013/04/unicorn.jpg',
- };
- }
- },
-
- },
-
- // Element Lifecycle
-
- ready: function() {
- // `ready` is called after all elements have been configured, but
- // propagates bottom-up. This element's children are ready, but parents
- // are not.
- //
- // This is the point where you should make modifications to the DOM (when
- // necessary), or kick off any processes the element wants to perform.
- },
-
- attached: function() {
- // `attached` fires once the element and its parents have been inserted
- // into a document.
- //
- // This is a good place to perform any work related to your element's
- // visual state or active behavior (measuring sizes, beginning animations,
- // loading resources, etc).
- },
-
- detached: function() {
- // The analog to `attached`, `detached` fires when the element has been
- // removed from a document.
- //
- // Use this to clean up anything you did in `attached`.
- },
-
- // Element Behavior
-
- /**
- * The `seed-element-lasers` event is fired whenever `fireLasers` is called.
- *
- * @event seed-element-lasers
- * @detail {{sound: String}}
- */
-
- /**
- * Sometimes it's just nice to say hi.
- *
- * @param {string} greeting A positive greeting.
- * @return {string} The full greeting.
- */
- sayHello: function(greeting) {
- var response = greeting || 'Hello World!';
- return 'seed-element says, ' + response;
- },
-
- /**
- * Attempts to destroy this element's enemies with an any beam of light!
- *
- * Or, at least, dispatches an event in the vain hope that someone else will
- * do the zapping.
- */
- fireLasers: function() {
- this.fire('seed-element-lasers', {sound: 'Pew pew!'});
- }
-
- });
-
-</script>
@@ -1,56 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <script src="../../web-component-tester/browser.js"></script>
-
- <!-- Step 1: import the element to test -->
- <link rel="import" href="../seed-element.html">
- </head>
- <body>
-
- <!-- You can use the document as a place to set up your fixtures. -->
- <seed-element></seed-element>
-
- <script>
- var myEl = document.querySelector('seed-element');
-
- suite('<seed-element>', function() {
-
- test('defines the "author" property', function() {
- assert.equal(myEl.author.name, 'Dimitri Glazkov');
- assert.equal(myEl.author.image, 'http://addyosmani.com/blog/wp-content/uploads/2013/04/unicorn.jpg');
- });
-
- test('says hello', function() {
- assert.equal(myEl.sayHello(), 'seed-element says, Hello World!');
-
- var greetings = myEl.sayHello('greetings Earthlings');
- assert.equal(greetings, 'seed-element says, greetings Earthlings');
- });
-
- test('fires lasers', function(done) {
- myEl.addEventListener('seed-element-lasers', function(event) {
- assert.equal(event.detail.sound, 'Pew pew!');
- done();
- });
- myEl.fireLasers();
- });
-
- });
- </script>
-
- </body>
-</html>
@@ -1,27 +0,0 @@
-<!doctype html>
-<!--
-@license
-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
-
- <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
- <script src="../../web-component-tester/browser.js"></script>
- </head>
- <body>
- <script>
- // Load and run all tests (.html, .js):
- WCT.loadSuites([
- 'basic-test.html',
- ]);
- </script>
- </body>
-</html>

0 comments on commit e39af5e

Please sign in to comment.