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

tizen-console

v1.1.1

Published

This is a package for adding a console window **React** component to a Tizen App running on a Samsung TV. Anything you have logged to the console will show up (excluding any filtered logs). there is an input for calling functions. anything you write into

Downloads

5

Readme

tizen-console

This is a package for adding a console window React component to a Tizen App running on a Samsung TV. Anything you have logged to the console will show up (excluding any filtered logs). there is an input for calling functions. anything you write into the input will be logged when you hit the enter key.

This package is a work in progress!! feel free to submit PRs for new and better features!

Installation:

To install all dependencies run:

npm install tizen-console

It will install:

  • dependencies and devDependencies from ./package.json
  • peerDependencies from ./package.json thanks to install-peers-cli
  • dependencies and devDependencies from ./example/package.json (example create react app for testing)

Utilization

be sure that your tizen project config.xml has the following priviledges enabled (at minimum):

<tizen:privilege name="http://tizen.org/privilege/tv.inputdevice"/>
<tizen:privilege name="http://developer.samsung.com/privilege/productinfo"/>

the package uses React and React-DOM as peer-dependencies so you will need to have those installed.

in your App component, as high in the tree as possible, add the TizenConsole component like so:

import React, { Component } from 'react';
import SomeComponent from './SomeComponent';
import SomeOtherComponent from './SomeComponent';
import { TizenConsole } from 'tizen-console';

class App extends Component {
  render() {
    return (
      <div>
        <TizenConsole size="lg" corner="tl" />
        <SomeComponent />
        <SomeOtherComponent />
      </div>
    );
  }
}

export default App;

Props

interface TizenConsoleProps {
  size: 'sm' | 'md' | 'lg';
  corner: 'tr' | 'tl' | 'br' | 'bl';
  filter?: Methods[];
}

type Methods =
  | 'log'
  | 'warn'
  | 'error'
  | 'info'
  | 'debug'
  | 'table'
  | 'time'
  | 'clear'
  | 'timeEnd'
  | 'count'
  | 'assert';

corner specified which corner of the TV window the console will be and size indicates the size of the console. Methods are an array of filter methods used to show only the types of console methods you want displayed.

using the console

activate and de-activate the console by pressing 12345 on your remote. the keyboard will open indicating that the input is active. type a function to log the result of the console and press the enter key

checking out the example app

to see the very simple example app in action:

first, clone the repo:

git clone https://github.com/ahardy42/tizen-console.git
cd tizen-console
npm install

Then, set up a tizen project using the tizen cli

tizen create web-project -p tv-samsung-5.5 -t BasicEmptyProject -n example
cd example
rm -rf css
rm main.js
rm index.html

Then, replace the CERTIFICATE_PROFILE and TV_PROFILE values in the MakeFile with your own certs.

Then, update PACKAGE_ID values in the MakeFile to match the id found in the newly created config.xml

now you're ready to run the example app!

to run in your browser:

npm run dev

to run on your emulator (first, make sure the emulator is open and running on your machine):

run npm run tizen

to run on your tv (first make sure your tv is connected and running):

run npm run tizen-tv

credits

used the following npm packages to create this app

and used the boilerplate ts project found at https://github.com/michal-wrzosek/react-component-lib