Skip to content

Commit 77cacc3

Browse files
committed
Updated README for alpha release.
1 parent d6a5934 commit 77cacc3

File tree

3 files changed

+15
-36
lines changed

3 files changed

+15
-36
lines changed

README.md

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ PNotify is a JavaScript notification plugin. PNotify can provide [desktop notifi
99

1010
# Whoa there!
1111

12-
I guarantee **none of this README applies to you!** You want to check out the **[README on the master branch](https://github.com/sciactive/pnotify/blob/master/README.md)**.
12+
Unless you're an alpha tester, **none of this README applies to you!** You want to check out the **[README on the master branch](https://github.com/sciactive/pnotify/blob/master/README.md)**.
1313

14-
This README is for **PNotify v4**. v4 isn't out yet, but it's got some huge changes.
14+
This README is for **PNotify v4**. v4 is only in alpha stage, but it's got some huge changes:
1515

1616
* jQuery is no longer required. v4 doesn't require any libraries, actually.
1717
* It's built using [Svelte](http://svelte.technology), which means it compiles down to vanilla JS.
@@ -20,25 +20,6 @@ This README is for **PNotify v4**. v4 isn't out yet, but it's got some huge chan
2020
* `insert_brs` option has gone away. (Text and title now have `white-space: pre-line;`.)
2121
* The default width was raised from 300px to 360px.
2222

23-
But v4 isn't even in the alpha stage yet.
24-
25-
Things that work:
26-
27-
* PNotify Core
28-
* Bright Theme styling (CSS)
29-
* Material styling (module)
30-
* Buttons module
31-
* Animate module
32-
* Callbacks module
33-
* NonBlock module
34-
* Mobile module
35-
* History module
36-
* Desktop module
37-
* Confirm module
38-
39-
Things that don't work:
40-
* npm package...
41-
4223
# Getting Started
4324

4425
You can get PNotify using NPM. (You can also use [jsDelivr](https://www.jsdelivr.com/package/npm/pnotify).)
@@ -49,30 +30,28 @@ npm install pnotify
4930

5031
Inside the pnotify directory in node_modules, you'll find a `src`, `lib`, and `dist` directory.
5132

52-
* `src` contains the actual Svelte source code, and CSS files.
53-
* `lib` contains all the JS files uncompressed.
33+
* `src` contains the Svelte source code, and uncompressed CSS.
34+
* `lib` contains all the compiled JS files uncompressed.
5435
* `dist` contains both JS and CSS files compressed.
5536
* `lib` and `dist` each have subdirectories for the available formats, UMD, IIFE, and ES6 modules.
5637

5738
So if you're not using Webpack or Rollup, here's how you'd include PNotify on your page:
5839

5940
```html
41+
<!-- From an NPM install. -->
6042
<script type="text/javascript" src="node_modules/pnotify/dist/iife/PNotify.js"></script>
61-
<link href="node_modules/pnotify/dist/PNotify.BrightTheme.css" media="all" rel="stylesheet" type="text/css" />
43+
<link href="node_modules/pnotify/dist/PNotifyBrightTheme.css" media="all" rel="stylesheet" type="text/css" />
6244
```
6345

46+
There are also examples of how to use various libraries (like Browserify and RequireJS) in the libtests dir.
47+
6448
Now you can use PNotify like this:
6549

66-
```html
67-
<script type="text/javascript">
68-
function makeNotice() {
69-
PNotify.notice({
70-
title: "Regular Notice",
71-
text: "Check me out! I'm a notice."
72-
});
73-
}
74-
</script>
75-
<button onclick="makeNotice()">Click me for Notice</button>
50+
```js
51+
PNotify.notice({
52+
title: "Regular Notice",
53+
text: "Check me out! I'm a notice."
54+
});
7655
```
7756

7857
## Using a UI Library

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ <h5 class="modal-title">'+button.text()+' - Source</h5>\
789789
<section class="container page-banner">
790790
<div class="intro-section">
791791
<h1>PNotify</h1>
792-
<h3>v4 <abbr title="but it's close">Pre-Alpha</abbr></h3>
792+
<h3>v4 <abbr title="you can use it, if you're daring">Alpha</abbr></h3>
793793
<p id="description">Beautiful JavaScript notifications. Now with <a href="index-nodependencies.html" target="_blank">zero dependencies</a>!</p>
794794
</div>
795795
<div class="intro-section">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"src",
2727
"make.js"
2828
],
29-
"main": "dist/umd/index.js",
29+
"main": "dist/iife/PNotify.js",
3030
"directories": {
3131
"lib": "lib/umd"
3232
},

0 commit comments

Comments
 (0)