Skip to content

Commit

Permalink
convert to TypeScript (#36)
Browse files Browse the repository at this point in the history
* converting code to TypeScript

* name refactoring, clearing out old .js files and adding unit tests in UI with Karma

* adding TodoTxtVault for data storage and having it throw exception on Task not found
  • Loading branch information
bicarbon8 committed Dec 12, 2019
1 parent 1ec3c0c commit 61aaf92
Show file tree
Hide file tree
Showing 76 changed files with 9,649 additions and 7,620 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@ node_modules/
*.orig
results/
img/
coverage/
7 changes: 4 additions & 3 deletions .travis.yml
@@ -1,5 +1,6 @@
language: node_js
node_js:
- 0.10
before_install:
- npm install -g grunt-cli
- 10.16.3
addons:
chrome: stable
firefox: latest
15 changes: 15 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
95 changes: 0 additions & 95 deletions Gruntfile.js

This file was deleted.

File renamed without changes.
76 changes: 45 additions & 31 deletions README.md
@@ -1,24 +1,24 @@
todoTxtWebUi ![build status](https://travis-ci.org/bicarbon8/todoTxtWebUi.svg)
============
# todoTxtWebUi ![build status](https://travis-ci.org/bicarbon8/todoTxtWebUi.svg)

@Created: 08/14/2012

@Author: Jason Holt Smith (<bicarbon8@gmail.com>)

DESCRIPTION:
------------
## DESCRIPTION:

A web UI to use with a todo.txt file. This project is an extention to the <http://www.todotxt.com> project
providing a rich web user interface for interacting with one's todo.txt file. The requirements of this
project are that it only use HTML, Javascript and CSS to accomplish all functionality in a Webkit
compatible browser. There must be no back-end server code, no local executables and no browser plugins
utilized in supporting the functionality of this project.

DEMO:
------------
## DEMO:

[ResponsiveDemo](https://rawgit.com/bicarbon8/todoTxtWebUi/master/index.html)

FEATURES:
------------
- Can easily be added to any existing webpage by simply adding a ```<div id="todotxt"></div>``` element and the external dependencies
## FEATURES:

- Can easily be added to any existing webpage by simply adding a `<div id="todotxt"></div>` element and the external dependencies
- Allows users to drag-and-drop in their todo.txt file (or select through a file dialog) for instant syncronization with existing task list
- Allows exporting of displayed tasks back out of the browser to the user's local filesystem thereby supporting saving of updates to the task list
- Stores the task list in the browser's localStorage cache so that changes are not lost between browser page reloads / refreshes.
Expand All @@ -29,39 +29,53 @@ FEATURES:
- Supports both mouse clicks and keyboard shortcuts for command and control such as adding new tasks, saving edits to tasks, deleting tasks currently being edited, and saving the task list to an external file
- Sorts the task list by Status (closed or active), Priority, Created Date, and then Completed Date with older items (those with an older created date) displaying higher than newer items

EXTERNAL DEPENDENCIES:
------------
## EXTERNAL DEPENDENCIES:

- [Bootstrap 3.3.1](http://getbootstrap.com/)
- [JQuery 1.11.1](http://jquery.com/)

RUNNING LOCALLY:
------------
## RUNNING LOCALLY:

- download the latest from: [github](https://github.com/bicarbon8/todoTxtWebUi/archive/master.zip)
- extract the download and open the ```todoTxtWebUi-master``` folder
- open the ```index.html``` file in a Webkit compatible browser

KEYBOARD SHORTCUTS:
------------
- ```Alt-t``` add a new task
- ```Alt-Enter``` save an open task
- ```Alt-p``` preview changes to an open task
- ```Alt-s``` export tasks
- ```Alt-c``` clear any filters

INCLUDING IN OTHER WEBSITES:
------------
- download the latest minified script from [github](https://rawgit.com/bicarbon8/todoTxtWebUi/master/dist/todoTxt.min.js)
- extract the download and open the `todoTxtWebUi-master` folder
- open the `index.html` file in a Webkit compatible browser

## KEYBOARD SHORTCUTS:

- `Alt-t` add a new task
- `Alt-Enter` save an open task
- `Alt-p` preview changes to an open task
- `Alt-s` export tasks
- `Alt-c` clear any filters

## INCLUDING IN OTHER WEBSITES:

- download the latest bundle from [github](https://rawgit.com/bicarbon8/todoTxtWebUi/master/dist/bundle.js)
- ensure you have the following css and javascript references in your html file:
```html
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="dist/todoTxt.min.css" />
<link rel="stylesheet" type="text/css" href="dist/todo-txt.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script type="text/javascript" src="dist/todoTxt.min.js"></script>
<script type="text/javascript" src="dist/bundle.js"></script>
```
- place a ```div``` element in your html body with an id of ```todotxt```. Ex:
- place a `div` element in your html body with an id of `todotxt`. Ex:
```html
<div id="todotxt"></div>
```
- open the webpage and the magic happens automatically :)
- open the webpage and the magic happens automatically

## NOTE:
- if you are tracking more than 1000 Tasks, the performance will start to degrade (~5 seconds per add / edit / delete operation)
- it is not recommended to track more than 5000 Tasks
- exporting your _todo-txt_ file will exclude all closed tasks so exporting and re-importing can serve as a way of keeping the number of tracked tasks under control

## Contributing to the Project:

- create a Fork of the repo in _GitHub_
- clone the code using `git clone https://github.com/<your-project-area>/todoTxtWebUi todoTxtWebUi` where `<your-project-area>` is replaced with the location of your Fork
- run `npm install` to install all dev dependencies
- build using `npm run build`
- test using `npm test`
- when you are happy with your changes, submit a Pull Request back to the _master_ branch at `https://github.com/bicarbon8/todoTxtWebUi`
File renamed without changes.
2 changes: 2 additions & 0 deletions dist/bundle.js

Large diffs are not rendered by default.

0 comments on commit 61aaf92

Please sign in to comment.