From b9ffcc1d0a57e3e5461866117178cc60a2b07567 Mon Sep 17 00:00:00 2001 From: Linus Miller Date: Thu, 14 Jul 2016 18:16:56 +0200 Subject: [PATCH] Dollr and app.js. --- package.json | 1 + server/templates/master.marko | 6 ++++++ src/.eslintrc | 4 ++++ src/app.js | 14 +++++++++++++- 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 02c84c6..f64fd86 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/server/templates/master.marko b/server/templates/master.marko index bb60709..85ed8ee 100644 --- a/server/templates/master.marko +++ b/server/templates/master.marko @@ -11,12 +11,18 @@ + + +

Hello

+ + +
diff --git a/src/.eslintrc b/src/.eslintrc index a28ae37..20694d9 100644 --- a/src/.eslintrc +++ b/src/.eslintrc @@ -1,6 +1,10 @@ { "extends": "airbnb", + "parserOptions": { + "sourceType": "strict" + }, + "rules": { "react/prop-types": 0, "guard-for-in": 0, diff --git a/src/app.js b/src/app.js index e921523..1b596b3 100644 --- a/src/app.js +++ b/src/app.js @@ -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); + }); + }); +});