Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Browserify and Babel with TypeScript and Rollup #1061

Merged
merged 3 commits into from
Oct 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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