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

Add elements helper #273

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 7 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@ language: node_js
sudo: required
before_script:
- npm install -g polymer-cli
- polymer install --variants
- >-
npm run update-types && git diff --exit-code || (echo -e
'\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run
update-types".' && false)
- >-
npm run format && git diff --exit-code || (echo -e '\n\033[31mERROR:\033[0m
Typings are stale. Please run "npm run format".' && false)
- 'npm run update-types && git diff --exit-code || (echo -e ''\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run update-types".'' && false)'
- 'npm run format && git diff --exit-code || (echo -e ''\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run format".'' && false)'
env:
global:
- secure: >-
JeSfmBNQGyT7fu9NURSHqK9miBYrieoVdCnzOIq1QRDpWEiUGJKrcWKbabA/1MrlYfbQDFwXIDGrv0hcZzf0xbDblo5s/jUnep1vq/w/IRznEDnhJelpjG6c38vlBbPQOZI3L32eu8w5BBmlXhc4XXpUGkIy94O1Iz7Tn3zkeFI/fKhMyrmgDUOuehP0EHyoKxLCyWGLV+aTRtif6TK/wn6ULwM+GvLiS7nykrnA2WoDEECAuCoIsfRD9UFoLH4dNmOoiEHGeSx3rL6aE0TV9GVpPpBkL6qe8LFJLV4GJsekVyeOnKlekbzts8joIrR62P9m2BHZMQkizyx6Tj22vF6uXI8HAvocNIbijiJPSKFRA2Ir6ZAtBKPFMv73upROSvzqT+8UjW4DM9EDQiheCZ+Hkv0cQqtSmmiS3GxrTxW622lKdg2uVbD2qH2Ac2wJNGztukKtAyR2wSyjD7R/wE2MiQrT2YlGw95aMMqVylF1CtXoUJWGXUdfT6N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poqEy0ozb7NjUEjYOR+OuZfKYVwT5VmAykKLNW3eQJc1zJjvhjghSIxOWH9AvD18UeQtEcv2J5pVFIp+BFVR25i0BH+efOwWJ49hk0o0N+Dw=
node_js: stable
addons:
firefox: latest
Expand All @@ -26,8 +18,7 @@ addons:
- google-chrome-stable
sauce_connect: true
script:
- xvfb-run polymer test
- >-
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test -s 'default';
fi
- xvfb-run polymer test --module-resolution=node --npm
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test --module-resolution=node --npm -s ''default''; fi'
dist: trusty

71 changes: 0 additions & 71 deletions bower.json

This file was deleted.

56 changes: 26 additions & 30 deletions demo/cats-only.html → demo/cats-only.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<!--
/**
@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">
<link rel="import" href="../../iron-validatable-behavior/iron-validatable-behavior.html">

<dom-module id="cats-only">
<template>
*/
import '@polymer/polymer/polymer-legacy.js';

import { IronValidatableBehavior } from '@polymer/iron-validatable-behavior/iron-validatable-behavior.js';
import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js';
import { html } from '@polymer/polymer/lib/utils/html-tag.js';
Polymer({
_template: html`
<style>
:host {
display: inline-block;
Expand All @@ -24,32 +26,26 @@
}
</style>
<input value="{{value}}" id="input" placeholder="Type 'cats' to prove you like cats">
</template>
</dom-module>

<script>
Polymer({
is: 'cats-only',

properties: {
value: {type: String},
`,

name: {type: String}
},
is: 'cats-only',

behaviors: [Polymer.IronValidatableBehavior],
properties: {
value: {type: String},

listeners: {'input': '_onInput'},
name: {type: String}
},

_onInput: function() {
this.value = this.$.input.value;
},
behaviors: [IronValidatableBehavior],
listeners: {'input': '_onInput'},

// Overidden from Polymer.IronValidatableBehavior. Will set the `invalid`
// attribute automatically, which should be used for styling.
_getValidity: function() {
return this.value === 'cats';
}
_onInput: function() {
this.value = this.$.input.value;
},

});
</script>
// Overidden from Polymer.IronValidatableBehavior. Will set the `invalid`
// attribute automatically, which should be used for styling.
_getValidity: function() {
return this.value === 'cats';
}
});
Loading