npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@denevads/dnv-smo

v1.0.35

Published

SMO module

Downloads

113

Readme

Introduction

Communication interface library between an HTML5 object and the functions of a Digital Signage Player from DenevaDS CMS.

Here we define the use of the library and the functions provided by the library

Instalation

The library is intended to be used together with Angular, so if we do not have the Angular CLI in the system it is convenient to install it to initialize the project.

npm install -g @angular/cli

We start a test project called html-deneva in the path we are in.

ng new html-deneva

Once we have the basic structure of the project we can install the library in the project by executing the following line inside the project folder:

npm install @denevads/dnv-smo

Initialization

Once we have the Angular project initialized, we proceed to import the module.

Inside the app.module definition in the app folder, we import the library.

 import { SMO } from '@denevads/dnv-smo/dist/smo'; 

and then add it as a provider in @NgModule

providers: [SMO]

Now all you have to do is add it to the Angular component and start using it.

Again in app.component we import the library

import { LogLevel, SMO } from '@denevads/dnv-smo/dist/smo'

And in the export of the AppComponent class, we add the constructor

constructor(private smo:SMO){ }

In this way we would already have available for use all the calls provided by the library using

this.smo.

Also in the import we have brought the enumeration of the log levels, which are used to log in the local storage. The usage would be as follows:

this.smo.smoCallBacks.smoLog('Test Message',LogLevel.Info);

Compilation and packaging.

In order for the project to run on a computer without problems, a couple of changes must be made to the default project code.

The first one is to modify the tsconfig.json so that the "target" is "ES5" instead of "ES2022".

And the second change is in the index file. Here we will do two things: -Delete the favicon import (in addition to deleting it from the file folder). -And we change the line

<base href="/"> 

to

<script>document.write('<base href="' + document.location + '" />');</script>

With these changes made, we can compile the project by executing the command line

ng b

This will generate a dist folder with the content of our compiled HTML5.

In order to upload it to the deneva player, we simply have to create a zip with the content in the root, and change the extension to

.wgt

npm run build npm login npm publish