-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 70c2509
Showing
13 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory": "../" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
|
||
[*] | ||
|
||
# Change these settings to your own preference | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# We recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
dist | ||
.sass-cache | ||
.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"node": true, | ||
"browser": true, | ||
"esnext": true, | ||
"bitwise": true, | ||
"camelcase": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"indent": 2, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"quotmark": "single", | ||
"regexp": true, | ||
"undef": true, | ||
"unused": true, | ||
"strict": true, | ||
"trailing": true, | ||
"smarttabs": true, | ||
"jquery": true, | ||
"globals": { | ||
"wrap": true, | ||
"unwrap": true, | ||
"Polymer": true, | ||
"Platform": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
bacon-ipsum | ||
================ | ||
|
||
See the [component page](http://Tasemu.github.io/bacon-ipsum) for more information. | ||
|
||
## Getting Started | ||
|
||
We've put together a [guide for bacon-ipsum](http://www.polymer-project.org/docs/start/reusableelements.html) to help get you rolling. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
:host { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<link rel="import" href="../polymer/polymer.html"> | ||
|
||
<!-- | ||
Element providing solution to no problem in particular. | ||
##### Example | ||
<bacon-ipsum></bacon-ipsum> | ||
@element bacon-ipsum | ||
@blurb Element providing solution to no problem in particular. | ||
@status alpha | ||
@homepage http://polymerlabs.github.io/bacon-ipsum | ||
--> | ||
<polymer-element name="bacon-ipsum" attributes="words paragraphs"> | ||
|
||
<link rel="import" href="../core-ajax/core-ajax.html"> | ||
|
||
<template> | ||
<link rel="stylesheet" href="bacon-ipsum.css" /> | ||
|
||
<core-ajax | ||
auto | ||
method="GET" | ||
url="http://baconipsum.com/api/" | ||
params='{"type":"all-meat", "paras":"{{paragraphs}}"}' | ||
handleAs="json" | ||
on-core-response="{{handleResponse}}"></core-ajax> | ||
|
||
<p id="thebacon"></p> | ||
|
||
</template> | ||
|
||
<script> | ||
|
||
Polymer({ | ||
author: 'Montague Monro', | ||
words: 5, | ||
paragraphs: 2, | ||
theBacon: '', | ||
|
||
handleResponse: function (res) { | ||
var scope = this; | ||
res.detail.response.forEach(function (element) { | ||
scope.$.thebacon.innerHTML += (element + "<br><br>"); | ||
}); | ||
}, | ||
}); | ||
|
||
</script> | ||
|
||
</polymer-element> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "bacon-ipsum", | ||
"version": "0.0.0", | ||
"keywords": [ | ||
"seed", | ||
"polymer", | ||
"web-components" | ||
], | ||
"main": "bacon-ipsum.html", | ||
"dependencies": { | ||
"polymer": "Polymer/polymer#^0.5.1", | ||
"core-ajax": "Polymer/core-ajax#~0.5.2" | ||
}, | ||
"devDependencies": { | ||
"web-component-tester": "Polymer/web-component-tester#^2.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> | ||
<title>bacon-ipsum Demo</title> | ||
|
||
<script src="../webcomponentsjs/webcomponents.js"></script> | ||
<link rel="import" href="bacon-ipsum.html"> | ||
|
||
</head> | ||
<body unresolved> | ||
|
||
<bacon-ipsum paragraphs="6"></bacon-ipsum> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> | ||
<script src="../webcomponentsjs/webcomponents.js"></script> | ||
<link rel="import" href="../polymer/polymer.html"> | ||
<link rel="import" href="../core-component-page/core-component-page.html"> | ||
|
||
</head> | ||
<body unresolved> | ||
|
||
<core-component-page></core-component-page> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> | ||
<title>bacon-ipsum</title> | ||
|
||
<script src="../../webcomponentsjs/webcomponents.js"></script> | ||
<script src="../../web-component-tester/browser.js"></script> | ||
|
||
<!-- Step 1: import the element to test --> | ||
<link rel="import" href="../bacon-ipsum.html"> | ||
|
||
</head> | ||
<body> | ||
|
||
<bacon-ipsum id="fixture"></bacon-ipsum> | ||
|
||
<script> | ||
var myEl = document.getElementById('fixture'); | ||
|
||
suite('<bacon-ipsum>', function() { | ||
|
||
test('defines the "author" property', function() { | ||
assert.equal(myEl.author, 'Dimitri Glazkov'); | ||
}); | ||
|
||
test('says hello', function() { | ||
assert.equal(myEl.sayHello(), 'bacon-ipsum says, Hello World!'); | ||
var greetings = myEl.sayHello('greetings Earthlings'); | ||
assert.equal(greetings, 'bacon-ipsum says, greetings Earthlings'); | ||
}); | ||
|
||
test('fires lasers', function(done) { | ||
myEl.addEventListener('bacon-ipsum-lasers-success', function(event) { | ||
assert.equal(event.detail.sound, 'Pew pew pew!'); | ||
done(); | ||
}); | ||
myEl.fireLasers(); | ||
}); | ||
|
||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> | ||
<title>Core Elements Test Runner</title> | ||
<meta charset="UTF-8"> | ||
|
||
<script src="../../webcomponentsjs/webcomponents.js"></script> | ||
<script src="../../web-component-tester/browser.js"></script> | ||
</head> | ||
|
||
<body> | ||
|
||
<script> | ||
WCT.loadSuites(['seed-element-basic.html']); | ||
</script> | ||
|
||
</body> | ||
|
||
</html> |