Dollr and app.js.

This commit is contained in:
Linus Miller 2016-07-14 18:16:56 +02:00
parent 6adcca697f
commit b9ffcc1d0a
4 changed files with 24 additions and 1 deletions

View File

@ -22,6 +22,7 @@
"connect-redis": "^3.1.0",
"cookie-parser": "^1.4.3",
"debug": "^2.2.0",
"dollr": "0.0.7",
"express": "^4.14.0",
"express-session": "^1.14.0",
"lodash": "^4.13.1",

View File

@ -11,12 +11,18 @@
<!-- CSS -->
<link rel="stylesheet" href="/css/main${data.css.suffix}.css">
<!-- JS -->
<script src="/js/app${data.js.suffix}.js"></script>
</head>
<body>
<main>
<h1>Hello</h1>
<button>Get Data</button>
</main>
</body>

View File

@ -1,6 +1,10 @@
{
"extends": "airbnb",
"parserOptions": {
"sourceType": "strict"
},
"rules": {
"react/prop-types": 0,
"guard-for-in": 0,

View File

@ -1 +1,13 @@
console.log('hello');
'use strict';
const $ = require('dollr/dollr').$;
$(function () {
console.log('loaded');
$('button').addEventListener('click', function () {
console.log('click');
navigator.geolocation.getCurrentPosition((position) => {
console.log(position);
});
});
});