Skip to content

Commit

Permalink
Replace Browserify and Babel with TypeScript and Rollup (#1061)
Browse files Browse the repository at this point in the history
* fix random element calculation

* replace Babel/Browserify with TypeScript/Rollup
  • Loading branch information
dstaley authored and leplatrem committed Oct 2, 2019
1 parent 7a2110e commit b5baf9f
Show file tree
Hide file tree
Showing 17 changed files with 3,099 additions and 6,731 deletions.
33 changes: 0 additions & 33 deletions .babelrc

This file was deleted.

40 changes: 22 additions & 18 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{
"parser": "babel-eslint",
"rules": {
"comma-dangle": 0,
"curly": 2,
"linebreak-style": [2, "unix"],
"no-console": 0,
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
"no-var": 2,
"prefer-const": 1,
"semi": [2, "always"]
},
"env": {
"es6": true,
"browser": true,
"node": true
},
"extends": "eslint:recommended",
"root": true
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"comma-dangle": 0,
"curly": 2,
"linebreak-style": [2, "unix"],
"no-console": 0,
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
"no-var": 2,
"prefer-const": 1,
"semi": [2, "always"]
},
"env": {
"es6": true,
"browser": true,
"node": true
},
"extends": ["prettier/@typescript-eslint"],
"root": true
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
/esdoc
/node_modules
/demo/kinto*
.DS_Store
.nyc_output
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"trailingComma": "es5"
}
93 changes: 52 additions & 41 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Kinto.js demo</title>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"
integrity="sha384-pdapHxIh7EYuwy6K7iE41uXVxGCXY0sAjBzaElYGJUrzwodck3Lx6IE2lA0rFREo"
crossorigin="anonymous">
</head>
<body>
<div class="container">
<h1>Tasks</h1>
<form class="form-inline" id="form">
<div class="form-group">
<input class="form-control" type="text" name="title" placeholder="Thing">
<input class="btn btn-primary" type="submit" value="Add">
</div>
</form>
<hr>
<div class="row">
<div class="col-md-6">
<ul id="tasks" class="list-group"></ul>
<button id="clearCompleted" class="btn">Clear completed</button>
<button id="sync" class="btn">Synchronize</button>
</div>
<div class="col-md-6">
<textarea id="results" style="font-family:Monaco,monospace;font-size:12px"
class="form-control col-md-6" rows="20"></textarea>
<head>
<meta charset="utf-8" />
<title>Kinto.js demo</title>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"
integrity="sha384-pdapHxIh7EYuwy6K7iE41uXVxGCXY0sAjBzaElYGJUrzwodck3Lx6IE2lA0rFREo"
crossorigin="anonymous"
/>
</head>
<body>
<div class="container">
<h1>Tasks</h1>
<form class="form-inline" id="form">
<div class="form-group">
<input
class="form-control"
type="text"
name="title"
placeholder="Thing"
/>
<input class="btn btn-primary" type="submit" value="Add" />
</div>
</form>
<hr />
<div class="row">
<div class="col-md-6">
<ul id="tasks" class="list-group"></ul>
<button id="clearCompleted" class="btn">Clear completed</button>
<button id="sync" class="btn">Synchronize</button>
</div>
<div class="col-md-6">
<textarea
id="results"
style="font-family:Monaco,monospace;font-size:12px"
class="form-control col-md-6"
rows="20"
></textarea>
</div>
</div>
<template id="task-tpl">
<li class="list-group-item">
<label>
<input class="done" type="checkbox" />
<span class="title"></span><br />
</label>
<br />
<small class="uuid"></small>
</li>
</template>
</div>
<template id="task-tpl">
<li class="list-group-item">
<label>
<input class="done" type="checkbox">
<span class="title"></span><br>
</label>
<br>
<small class="uuid"></small>
</li>
</template>
</div>
<script src="kinto.js"></script>
<script src="demo.js"></script>
</body>
<script src="kinto.min.js"></script>
<script src="demo.js"></script>
</body>
</html>
Loading

0 comments on commit b5baf9f

Please sign in to comment.