Create simple template and component

This commit is contained in:
julien Lengrand-Lambert
2017-06-17 11:34:14 +02:00
parent 64f9f75fdf
commit 006133a540
5 changed files with 43 additions and 6 deletions

4
.gitignore vendored
View File

@@ -59,4 +59,6 @@ typings/
# no need to share proxy info
.npmrc
.bowerrc
.bowerrc
yarn.lock

View File

@@ -0,0 +1,20 @@
<link rel="import" href="/polymer/polymer.html">
<dom-module id="example-component">
<template>
<style>
:host {
display: block;
}
</style>
<h1>Example</h1>
<p>This is an example almost empty component</p>
</template>
<script>
Polymer({
is: 'example-component'
});
</script>
</dom-module>

16
app/index.html Normal file
View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Soundcloud Playlist, featuring Polymer</title>
</head>
<script src="webcomponentsjs/webcomponents-lite.js"></script>
<link rel="stylesheet" href="index.css">
<link rel="import" href="components/example-component/example-component.html">
<body>
<example-component></example-component>
</body>
</html>

View File

@@ -2,7 +2,7 @@
"name": "polymer-hot-reloading-example",
"description": "A simple example of polymer project with hot reloading",
"dependencies": {
"polymer": "^2.0.0",
"polymer": "^2.0.0"
},
"ignore": [
"**/.*",

View File

@@ -9,8 +9,7 @@
"author": "Julien Lengrand-Lambert <julien.lengrand-lambert@ing.nl>",
"license": "MIT",
"devDependencies": {
"browser-sync": "^2.18.12"
},
"dependencies": {
"browser-sync": "^2.18.12",
"bower": "^1.8.0"
}
}
}