Dollr and app.js.
This commit is contained in:
parent
6adcca697f
commit
b9ffcc1d0a
@ -22,6 +22,7 @@
|
|||||||
"connect-redis": "^3.1.0",
|
"connect-redis": "^3.1.0",
|
||||||
"cookie-parser": "^1.4.3",
|
"cookie-parser": "^1.4.3",
|
||||||
"debug": "^2.2.0",
|
"debug": "^2.2.0",
|
||||||
|
"dollr": "0.0.7",
|
||||||
"express": "^4.14.0",
|
"express": "^4.14.0",
|
||||||
"express-session": "^1.14.0",
|
"express-session": "^1.14.0",
|
||||||
"lodash": "^4.13.1",
|
"lodash": "^4.13.1",
|
||||||
|
|||||||
@ -11,12 +11,18 @@
|
|||||||
|
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
<link rel="stylesheet" href="/css/main${data.css.suffix}.css">
|
<link rel="stylesheet" href="/css/main${data.css.suffix}.css">
|
||||||
|
|
||||||
|
<!-- JS -->
|
||||||
|
<script src="/js/app${data.js.suffix}.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<h1>Hello</h1>
|
<h1>Hello</h1>
|
||||||
|
|
||||||
|
<button>Get Data</button>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
{
|
{
|
||||||
"extends": "airbnb",
|
"extends": "airbnb",
|
||||||
|
|
||||||
|
"parserOptions": {
|
||||||
|
"sourceType": "strict"
|
||||||
|
},
|
||||||
|
|
||||||
"rules": {
|
"rules": {
|
||||||
"react/prop-types": 0,
|
"react/prop-types": 0,
|
||||||
"guard-for-in": 0,
|
"guard-for-in": 0,
|
||||||
|
|||||||
14
src/app.js
14
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);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user