1.1.2 • Published 7 years ago

aurelia-notifications v1.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

#aurelia-notifications More or less copied over version of aurelia/dialog for the purpose of creating notifications.

Styling

Removed "default styles" to style it the way you want, without littering your CSS/SCSS/SASS with "!important"'s everywhere. Styling can be applied via classnames ofc, as well as with a custom css string while configuring the plugin at aurelia bootup.

Webpack Support

If you want your module to work appropriately with Aurelia and Webpack, ensure you define in your package.json an Aurelia build resources map so the compiler knows where each file lives. This makes it easier for the end user consuming your package to use it without issue.

Aurelia CLI Support

This plugin skeleton exports an AMD module format which the Aurelia CLI currently consumes.

"dependencies": [
  {
    "name": "my-cool-package",
    "path": "../node_modules/my-cool-package/dist/amd",
    "main": "somefile",
    "env": "dev"
  }
 ]
import {Aurelia} from 'aurelia-framework'
import {NotificationConfiguration} from "aurelia-notifications";

export function configure(aurelia: Aurelia) {
    aurelia.use
        .standardConfiguration()
        .feature('resources')
        .plugin('aurelia-notifications', (config: NotificationConfiguration) => {
            config.useCSS("THIS IS MY OPTIONAL CUSTOM CSS")
        });

    aurelia.start().then(() => aurelia.setRoot());
}