Skip to content

Commit

Permalink
Merge cc816c2 into be1ec1c
Browse files Browse the repository at this point in the history
  • Loading branch information
burdiuz committed Oct 15, 2018
2 parents be1ec1c + cc816c2 commit 66bec97
Show file tree
Hide file tree
Showing 31 changed files with 3,855 additions and 3,134 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.js]
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = false
32 changes: 22 additions & 10 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"parser": "babel-eslint",
"extends": [
"airbnb",
"plugin:flowtype/recommended"
],
"plugins": [
"flowtype"
],
"extends": "airbnb",
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
Expand All @@ -16,8 +10,22 @@
},
"env": {
"browser": true,
"node": true,
"jest": true
"node": true
},
"globals": {
"jest": true,
"describe": true,
"it": true,
"test": true,
"expect": true,
"should": true,
"assert": true,
"beforeEach": true,
"afterEach": true,
"beforeAll": true,
"afterAll": true,
"before": true,
"after": true
},
"rules": {
"arrow-parens": [
Expand All @@ -32,6 +40,10 @@
],
"no-param-reassign": 1,
"padded-blocks": 0,
"no-plusplus": 0
"no-plusplus": 0,
"function-paren-newline": 0,
"object-curly-newline": 0,
"no-bitwise": 0,
"max-len": ["error", { "code": 120 }]
}
}
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Thumbs.db
ehthumbs.db

.idea/
.history/
.vscode/

bower_components/
node_modules/
Expand Down
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.*
coverage/
fixtures/
source/
__tests__/
rollup.*
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always",
"parser": "flow",
"printWidth": 100
}
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ Just another EventDispatcher/[EventTarget](https://developer.mozilla.org/en-US/d
## Installation
Easy to install with [npm](https://www.npmjs.com/) package manager
```javascript
npm install @actualwave/event-dispatcher
npm install --save @actualwave/event-dispatcher
```
with [yarn](https://yarnpkg.com/) package manager
```javascript
yarn add @actualwave/event-dispatcher
```

## Usage
`Note: When used directly in browser you may want to use "dist/event-dispatcher.direct.js" file, it provides globally accessible EventDispatcher object.

EventDispatcher distribution package is wrapped into UMD wrapper, so it can be used with any AMD module loader, nodejs `require()` or without any.
> Note: EventDispatcher distribution package contains `dist/` folder with package wrapped into UMD wrapper, so it can be used with any AMD module loader, nodejs `require()` or without any.
To start using EventDispatcher, just instantiate it on its own
```javascript
class MyClass {
Expand Down Expand Up @@ -87,7 +91,7 @@ Example available in project's `example` folder. To try example first run server
```javascript
npm run server
```
And then go to [http://localhost:8081/example/index.html](http://localhost:8081/example/index.html)
And then go to [http://localhost:8081/index.html](http://localhost:8081/index.html)

## API

Expand Down
2 changes: 0 additions & 2 deletions dist/event-dispatcher.direct.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/event-dispatcher.direct.js.map

This file was deleted.

Loading

0 comments on commit 66bec97

Please sign in to comment.