Skip to content
This repository has been archived by the owner on Apr 25, 2018. It is now read-only.

Commit

Permalink
chore(all): convert to typescript and update to latest oribella
Browse files Browse the repository at this point in the history
  • Loading branch information
stoffeastrom committed Feb 17, 2017
1 parent 3c6e760 commit 3469534
Show file tree
Hide file tree
Showing 42 changed files with 2,200 additions and 2,071 deletions.
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# 2 space indentation
[**.*]
indent_style = space
indent_size = 2
indent_size = 2
15 changes: 0 additions & 15 deletions .eslintrc

This file was deleted.

7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
jspm_packages
bower_components
.DS_STORE
dist
typings
coverage
.nyc_output
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Place your settings in this file to overwrite default and user settings.
{
"typescript.tsdk": "node_modules/typescript/lib",
"search.exclude": {
"**/node_modules": true,
"**/dist": true,
"**/coverage": true,
"**/typings": true,
"**/.nyc_output": true
},
"tslint.autoFixOnSave": true
}
29 changes: 29 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "npm",
"args": [
"run",
"-s"
],
"isShellCommand": true,
"showOutput": "always",
"suppressTaskName": true,
"tasks": [
{
"taskName": "build",
"isBuildCommand": true,
"args": [
"build"
]
},
{
"taskName": "test",
"isTestCommand": true,
"args": [
"test"
]
}
]
}
11 changes: 0 additions & 11 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Christoffer Åström.
Copyright (c) 2016-present Christoffer Åström

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,37 @@
# aurelia-gestures
An Aurelia plugin for oribella gestures such as Tap, Doubletap, Longtap, Swipe, LongtapSwipe, Pinch and Rotate.
# oribella-aurelia-sortable

[![npm version](https://badge.fury.io/js/oribella-aurelia-gestures.svg)](https://badge.fury.io/js/oribella-aurelia-gestures)

Gestures plugin for *Aurelia* powered by *Oribella*

## [Usage](./docs/usage.md#installation)

## Building

```shell
npm run build
```

## Tests

```shell
npm run test
```

## Developing

```shell
npm run dev;
```

## Visual Studio Code

### Tests
```shell
ctrl + alt + t
```

### Building
```shell
cmd/ctrl + shift + b
```
11 changes: 11 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
machine:
node:
version: 6.9.1

dependencies:
post:
- node_modules/.bin/typings install

test:
post:
- npm run coverage
Binary file added demo/.DS_Store
Binary file not shown.
21 changes: 21 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!doctype html>
<html>

<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta charset="utf-8">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta http-equiv="cleartype" content="on">
<link rel="stylesheet" href="https://unpkg.com/leonardo-ui@1.0.2/dist/leonardo-ui.min.css" type="text/css" />
<style>
</style>
</head>

<body aurelia-app="main">
</body>

</html>
33 changes: 33 additions & 0 deletions demo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"license": "MIT",
"devDependencies": {
"aurelia-webpack-plugin": "aurelia/webpack-plugin#v2.0",
"awesome-typescript-loader": "^3.0.0-beta.18",
"bundle-loader": "^0.5.4",
"compression-webpack-plugin": "^0.3.2",
"css-loader": "^0.26.1",
"extract-text-webpack-plugin": "^2.0.0-rc.3",
"html-loader": "^0.4.4",
"html-webpack-plugin": "^2.28.0",
"less": "^2.7.2",
"less-loader": "^2.2.3",
"postcss-cssnext": "^2.9.0",
"postcss-loader": "^1.3.0",
"source-map-loader": "^0.1.6",
"style-loader": "^0.13.1",
"tslib": "^1.5.0",
"typescript": "^2.2",
"webpack": "^2.2",
"webpack-dev-server": "^2.2"
},
"dependencies": {
"aurelia-bootstrapper": "^2.0.1",
"aurelia-loader-webpack": "^2.0.0",
"oribella": "^0.6.1",
"oribella-framework": "^0.8.2"
},
"scripts": {
"dev": "webpack-dev-server --host 0.0.0.0",
"build": "webpack -p"
}
}
5 changes: 5 additions & 0 deletions demo/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: [
require('postcss-cssnext')({ /* ...options */ })
]
}
3 changes: 3 additions & 0 deletions demo/src/PLATFORM.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare namespace PLATFORM {
function moduleName(module: string, chunk?: string): string;
}
32 changes: 32 additions & 0 deletions demo/src/app.html

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions demo/src/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Router, RouterConfiguration } from 'aurelia-router';
import '../styles.css';

export class App {
public router: Router;

public configureRouter(config: RouterConfiguration, router: Router) {
config.map([
{ route: ['', 'gestures'], name: 'gestures', moduleId: PLATFORM.moduleName('gestures', 'gestures'), nav: true, title: 'Gestures' }
]);
this.router = router;
}
}
8 changes: 8 additions & 0 deletions demo/src/gestures.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<div
oa-tap.call="onTap()"
oa-doubletap="end.call: onDoubletap()"
oa-longtap="time-end.call: onLongtap()"
oa-swipe="update.call: onSwipe()"
oa-longtap-swipe="update.call: onLongtapSwipe()">Gesture me!</div>
</template>
17 changes: 17 additions & 0 deletions demo/src/gestures.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export class Gestures {
public onTap() {
console.log('tap');
}
public onDoubletap() {
console.log('doubletap');
}
public onLongtap() {
console.log('longtap');
}
public onSwipe() {
console.log('swipe');
}
public onLongtapSwipe() {
console.log('longtap swipe');
}
}
10 changes: 10 additions & 0 deletions demo/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Aurelia } from 'aurelia-framework';
import { PLATFORM } from 'aurelia-pal';

export function configure(aurelia: Aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin(PLATFORM.moduleName('oribella-aurelia-gestures'));
aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app')));
}
Loading

0 comments on commit 3469534

Please sign in to comment.