Skip to content

Commit f617d84

Browse files
author
Kyle Andrews
committed
Prepares for v1.1.0 release
1 parent 8847d14 commit f617d84

File tree

3 files changed

+74
-59
lines changed

3 files changed

+74
-59
lines changed

CHANGELOG.md

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,64 +7,75 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.1.0] - 2020-02-11
11+
1012
### Added
1113

12-
- support for applying custom classes [#6](https://github.com/codewithkyle/notifyjs/issues/6)
14+
- support for applying dynamic notificaiton classes [#6](https://github.com/codewithkyle/notifyjs/issues/6)
15+
- support for dynamic button classes
16+
- testing
17+
- generic material design based CSS stylesheet
18+
19+
### Deprecated
20+
21+
- notifications `position` value
22+
- notifications `element` value
1323

1424
## [1.0.3] - 2020-01-09
1525

1626
### Fixed
1727

18-
- updated type declarations
28+
- updated type declarations
1929

2030
## [1.0.2] - 2020-01-09
2131

2232
### Added
2333

24-
- `Notify.d.ts` declaration file to the `files` array in `package.json`
34+
- `Notify.d.ts` declaration file to the `files` array in `package.json`
2535

2636
## [1.0.1] - 2020-01-09
2737

2838
### Added
2939

30-
- new `notify` export providing access to a global notification manager
40+
- new `notify` export providing access to a global notification manager
3141

3242
### Removed
3343

34-
- [http-server](https://www.npmjs.com/package/http-server) dev dependency
44+
- [http-server](https://www.npmjs.com/package/http-server) dev dependency
3545

3646
## [1.0.0] - 2019-12-15
3747

3848
### Added
3949

40-
- TypeScript declaration file for `Notify.js`
50+
- TypeScript declaration file for `Notify.js`
4151

4252
### Changed
4353

44-
- Updated to ES2019
54+
- Updated to ES2019
4555

4656
### Removed
4757

48-
- Support for IE 11
49-
- Removed minimum notification duration [#2](https://github.com/codewithkyle/notifyjs/issues/2)
58+
- Support for IE 11
59+
- Removed minimum notification duration [#2](https://github.com/codewithkyle/notifyjs/issues/2)
5060

5161
## [0.2.0] - 2019-09-30
5262

5363
### Added
5464

55-
- Reworked library to use `window.requestAnimationFrame` instead of `setTimeout` in order to increase performance
56-
- Notifications are queued and will be displayed in the order they're submitted
57-
- Added positioning information/values
58-
- Updated HTML structure to allow for more robust layouts/designs
59-
- Removed the 10 second maximum notification duration
65+
- Reworked library to use `window.requestAnimationFrame` instead of `setTimeout` in order to increase performance
66+
- Notifications are queued and will be displayed in the order they're submitted
67+
- Added positioning information/values
68+
- Updated HTML structure to allow for more robust layouts/designs
69+
- Removed the 10 second maximum notification duration
6070

6171
### Removed
6272

63-
- Entire existing codebase due to rewrite
73+
- Entire existing codebase due to rewrite
6474

65-
[Unreleased]: https://github.com/codewithkyle/notifyjs/compare/v1.0.3...HEAD
75+
[unreleased]: https://github.com/codewithkyle/notifyjs/compare/v1.1.0...HEAD
76+
[1.1.0]: https://github.com/codewithkyle/notifyjs/compare/v1.0.3...v1.1.0
6677
[1.0.3]: https://github.com/codewithkyle/notifyjs/compare/v1.0.2...v1.0.3
6778
[1.0.2]: https://github.com/codewithkyle/notifyjs/compare/v1.0.1...v1.0.2
6879
[1.0.1]: https://github.com/codewithkyle/notifyjs/compare/v1.0.0...v1.0.1
6980
[1.0.0]: https://github.com/codewithkyle/notifyjs/compare/v0.2.0...v1.0.0
70-
[0.2.0]: https://github.com/codewithkyle/notifyjs/compare/v0.1.0...v0.2.0
81+
[0.2.0]: https://github.com/codewithkyle/notifyjs/compare/v0.1.0...v0.2.0

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ npm i --save @codewithkyle/notifyjs
1313
Once the package is installed import the package:
1414

1515
```typescript
16-
import { NotificationManager } from '@codewithkyle/notifyjs';
16+
import { NotificationManager } from "@codewithkyle/notifyjs";
1717
```
1818

1919
Then it's as simple as creating a new instance of the class and calling the `notify()` method:
2020

2121
```typescript
2222
const notificationManager = new NotificationManager();
2323
notificationManager.notify({
24-
message: 'All notifications require a message',
24+
message: "All notifications require a message",
2525
});
2626
```
2727

2828
Notifications are queued and displayed in the order that they were requested. The queue can be skipped by settings the `force` flag to true.
2929

3030
```typescript
3131
notificationManager.notify({
32-
message: 'This message will close the current notification and will jump the queue',
32+
message: "This message will close the current notification and will jump the queue",
3333
force: true,
3434
});
3535
```
@@ -42,7 +42,7 @@ Notify.js allows custom notification duration. The minimum time allowed is 4 sec
4242

4343
```typescript
4444
notificationManager.notify({
45-
message: 'The user will have to close this notification',
45+
message: "The user will have to close this notification",
4646
duration: Infinity,
4747
closeable: true,
4848
});
@@ -54,22 +54,22 @@ Notify.js also allows for user interactions via a button element. The action req
5454

5555
```typescript
5656
notificationManager.notify({
57-
message: 'A new version of this application is available',
57+
message: "A new version of this application is available",
5858
duration: Infinity,
5959
closeable: true,
6060
buttons: [
6161
{
62-
label: 'Update',
63-
callback: () => { console.log('User clicked the update button') },
64-
}
62+
label: "Update",
63+
callback: () => {
64+
console.log("User clicked the update button");
65+
},
66+
},
6567
],
6668
});
6769
```
6870

6971
## HTML Structure
7072

71-
The notification element is composed of the following HTML. This library doesn't provide/force any CSS, for a material design styled snackbar notification [click here](https://components.codewithkyle.com/snackbars/dark-snackbar).
72-
7373
```html
7474
<snackbar-component>
7575
<p>Custom notification message</p>
@@ -81,3 +81,7 @@ The notification element is composed of the following HTML. This library doesn't
8181
</snackbar-actions>
8282
</snackbar-component>
8383
```
84+
85+
## Stylesheets
86+
87+
This library doesn't provide/force any CSS, for a material design styled snackbar notification [click here](https://github.com/codewithkyle/notifyjs/blob/master/test/snackbar.css).

package.json

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
{
2-
"name": "@codewithkyle/notifyjs",
3-
"version": "1.0.3",
4-
"description": "A simple JavaScript library for creating and managing snackbar notifications",
5-
"main": "notify.js",
6-
"types": "notify.d.ts",
7-
"files": [
8-
"notify.js",
9-
"notify.js.map",
10-
"notify.d.ts",
11-
"notification-manager.js",
12-
"notification-manager.js.map",
13-
"notification-manager.d.ts"
14-
],
15-
"scripts": {
16-
"compile": "tsc",
17-
"test": "serve ./test"
18-
},
19-
"keywords": [
20-
"snackbar",
21-
"notification",
22-
"lightweight"
23-
],
24-
"author": "Kyle Andrews",
25-
"license": "MIT",
26-
"devDependencies": {
27-
"serve": "^11.3.0",
28-
"typescript": "^3.7.4"
29-
},
30-
"publishConfig": {
31-
"registry": "https://npm.pkg.github.com/"
32-
},
33-
"dependencies": {}
2+
"name": "@codewithkyle/notifyjs",
3+
"version": "1.1.0",
4+
"description": "A simple JavaScript library for creating and managing snackbar notifications",
5+
"main": "notify.js",
6+
"types": "notify.d.ts",
7+
"files": [
8+
"notify.js",
9+
"notify.js.map",
10+
"notify.d.ts",
11+
"notification-manager.js",
12+
"notification-manager.js.map",
13+
"notification-manager.d.ts"
14+
],
15+
"scripts": {
16+
"compile": "tsc",
17+
"test": "serve ./test"
18+
},
19+
"keywords": [
20+
"snackbar",
21+
"notification",
22+
"lightweight"
23+
],
24+
"author": "Kyle Andrews",
25+
"license": "MIT",
26+
"devDependencies": {
27+
"serve": "^11.3.0",
28+
"typescript": "^3.7.4"
29+
},
30+
"publishConfig": {
31+
"registry": "https://npm.pkg.github.com/"
32+
},
33+
"dependencies": {}
3434
}

0 commit comments

Comments
 (0)