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

@huumun/lyra

v8.4.3

Published

Client package for accessing data/content from LYRA - huumun Data Management solution

Downloads

51

Readme

Author: Sahil David, Margarida López | Date: August 17th, 2020 | Last updated: June 14th 2022

LYRA Integration

Overview

LYRA is a Content Management Solution which is one of the solutions as a part of huumun Platform Suite. LYRA provides variable yet flexible data structures which gives the unique edge and ability to store data/content suited to your application.

LYRA offers keys in the form of, brandKey and projectKey which are generated automatically during the setup. These keys are required to make a connection to LYRA Platform from an application.

For details about access keys please contact Margarida Lopez [email protected] or huumun Developers [email protected]

Using the package

LYRA offers an npm package for Integrating Vue application with LYRA

Following are the steps to use LYRA client npm package:

To install package:

npm i @huumun/lyra

Once installed LYRA can be installed into Vue App.

You also need to create lyra.config.js file in your root folder of Vue App. This serves as configuration file for package

module.exports = {
	brandKey: 'brandKey from LYRA',
	projectKey: 'projectKey from LYRA',
	localisations: [
		{ localisation: 'localisation-code', default: 'boolean', newInstance: 'boolean' }
	]
};
import lyraConfig from './lyra.config';
import { vueLyra } from '@huumun/lyra';

Vue.use(vueLyra, lyraConfig);

The above install step will expose methods to Vue prototype which can be used to access the data required. Following are the methods exposed

Assets Methods

  • Vue.prototype.$lyra.asset(key: string): Returns asset value with key
  • Vue.prototype.$lyra.assetExist(key: string): Returns true/false if asset exist with key
  • Vue.prototype.$lyra.assetsAll(): Returns all the assets with key/value

Citations Methods

  • Vue.prototype.$lyra.citation(): Returns citation value with key
  • Vue.prototype.$lyra.citationExist(key: string): Returns true/false if citation exist with key
  • Vue.prototype.$lyra.citationsAll(): Returns all the citations with key/value
  • Vue.prototype.$lyra.citationsAll(type: string): Returns all the citations with citation type

App Manager Methods

  • Vue.prototype.$lyra.appManager(): Returns complete App Manager
  • Vue.prototype.$lyra.appManager(tierId: string): Return Tier specific data
  • Vue.prototype.$lyra.endpoints({ tierId: string }): Return endpoints data for specific tier
  • Vue.prototype.$lyra.endpoints({ tierId: string, endpointId: string }): Return endpoint data for specific tier and endpoint

The $lyra methods are asynchronous in nature and returns a promise, with the value required.

Download content locally

LYRA npm package also allows to download the data/content locally to the projects directory in the form of JSON file. There are two modes for using LYRA. Package offers npm scripts to achieve required implementation.

  • Live mode: Get content directly from LYRA CMS.
# Script: lyra-live
# Usage in Client App: 
npm explore @huumun/lyra -- npm run lyra-live
  • Production mode: Content is downloaded and saved locally in the JSON files. The methods then serve local JSON files as database. This steps needs to be included before the Vue build phase.
# Script: lyra-prod
# Usage in Client App: 
npm explore @huumun/lyra -- npm run lyra-prod

Arguments

These are the arguments you can pass to your node script to configure your LYRA setup.

You should follow key=value syntax.

|Key|Mode|Value|Default value|Description| |---|---|---|---|---| |mode||production, live|production|Defines the LYRA content mode: live for live connection, production to download content locally.| |localisation||String|-|Defines the localisation it should get/download the content from.| |status|production|String||If specified, will only download endpoints from specified tier (and its corresponding child tiers) and value. Usage status:{{tierId}}:{{endpoint status meta value}}. As an example, having a Studies tier with endpoints marked with status as live, we will use status=studies:live|