Skip to content

Commit

Permalink
Add a package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Smithett committed Nov 24, 2014
1 parent c3702c9 commit 5c2d9be
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ dragster.removeListeners();
```

## Contributing
Dragster is written in [CoffeeScript](http://coffeescript.org/). To compile, [install CoffeeScript](http://coffeescript.org/#installation) then run `coffee -o lib/ -cw src/`.
Dragster is written in [CoffeeScript](http://coffeescript.org/).

```
npm install
npm run build
```

## License
Dragster is released under the [MIT License](http://ben.mit-license.org/)
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dragster",
"version": "0.1.2",
"version": "0.1.3",
"main": "lib/dragster.js",
"ignore": [
"demo_assets",
Expand Down
6 changes: 3 additions & 3 deletions lib/dragster.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "dragster",
"version": "0.1.3",
"description": "Better HTML5 drag events",
"main": "lib/dragster.js",
"scripts": {
"build": "./node_modules/.bin/coffee -o lib/ -cw src/"
},
"repository": {
"type": "git",
"url": "https://github.com/bensmithett/dragster.git"
},
"author": "Ben Smithett",
"license": "MIT",
"bugs": {
"url": "https://github.com/bensmithett/dragster/issues"
},
"homepage": "https://github.com/bensmithett/dragster",
"devDependencies": {
"coffee-script": "^1.8.0"
}
}
5 changes: 2 additions & 3 deletions src/dragster.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Dragster
@second = true
else
@first = true
@el.dispatchEvent new CustomEvent 'dragster:enter',
@el.dispatchEvent new CustomEvent "dragster:enter",
bubbles: true
cancelable: true
detail:
Expand All @@ -25,7 +25,7 @@ class Dragster
@first = false

if !@first && !@second
@el.dispatchEvent new CustomEvent 'dragster:leave',
@el.dispatchEvent new CustomEvent "dragster:leave",
bubbles: true
cancelable: true
detail:
Expand All @@ -44,5 +44,4 @@ class Dragster
@first = false
@second = false


window.Dragster = Dragster

0 comments on commit 5c2d9be

Please sign in to comment.