Create first web components

* Create basic sc-title component
* Create basic sc-profile component
* Modify nodemon config so it watches html files too
This commit is contained in:
Julien Lengrand-Lambert
2017-06-01 16:46:15 +02:00
parent 3fd60000b1
commit eeddded792
4 changed files with 45 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<dom-module id="sc-profile">
<template>
<style>
:host {
display: block;
}
</style>
<p>This is a first test</p>
</template>
<script>
Polymer({
is: 'sc-profile'
});
</script>
</dom-module>

View File

@@ -0,0 +1,19 @@
<link rel="import" href="../../../bower_components/polymer/polymer.html">
<dom-module id="sc-title">
<template>
<style>
:host {
display: block;
}
</style>
<h1>Soundcloud Playlist, featuring Polymer</h1>
</template>
<script>
Polymer({
is: 'sc-title'
});
</script>
</dom-module>

View File

@@ -5,7 +5,12 @@
<title>Soundcloud Playlist, featuring Polymer</title>
</head>
<script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../app/components/sc-title/sc-title.html">
<link rel="import" href="../app/components/sc-profile/sc-profile.html">
<body>
<h1>Title</h1>
<sc-title></sc-title>
<sc-profile></sc-profile>
</body>
</html>

View File

@@ -5,7 +5,7 @@
"private": true,
"main": "server/app.js",
"scripts": {
"start": "nodemon server/app.js",
"start": "nodemon -e .js,.html server/app.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Julien Lengrand-Lambert <julien.lengrand-lambert@ing.nl>",