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

amplience-developer-portal-code-examples-test

v1.0.0

Published

Code examples for the Amplience Developer Portal: https://github.com/amplience/amplience-developer-portal

Downloads

2

Readme

Amplience Developer Portal Code Examples

Introduction

Repository contains all code sandbox examples for different frameworks used in Amplience Developer Portal tabbed component. There is an Amplience code sandbox team space where each example in separate folder can be imported as a template and will remain in sync with the main branch.

The path that needs to be added to the content form will look like github/amplience/amplience-developer-portal-code-examples/tree/<branch>/<path-to-example> and will be available on https://codesandbox.io/s/github/amplience/amplience-developer-portal-code-examples/tree/<branch>/<path-to-example>

Setting up content types and content type schemas with DC CLI

All the content types and content types schemas used to create the content managed pages live in the ./content directory; directions for getting started, configuration, installation and syncing using the DC command line tool can be found below.

Further information regarding the set-up and use of the DC-CLI tool can be found here.

Getting started

To install the package run:

npm install -g @amplience/dc-cli

Configuration

DC Management API credentials are needed along with the hub Id which can be found in the DC App settings menu under properties.

dc-cli configure --clientId <your-client-id> --clientSecret <your-client-secret> --hubId <your-hub-id>

Installation

To install or update content type schemas and their metadata, which sets them to be validated at a slot/content/partial type, run the following command:

dc-cli content-type-schema import ./content/content-type-schemas

To install the content types run

dc-cli content-type import ./content/content-types

Please note: There are two content type properties, repositories and visualisations that are likely be different per hub and environment.

By default the above command will assign the content type to a repository named content as specificed in the JSON. You can update the repository for all ./content/content-types by using find and replace or append the flag --skipAssign which will ignore setting the repository. This can then be set in the UI or via the DC CLI.

Syncing

Once a content type schema has been updated, it has to be synced with its content type for the update to be reflected by running the following comand:

dc-cli content-type sync <id>

If the content type id is unknown it can be quickly found by getting the updated content type schema's $id property URI value and running the following command:

dc-cli content-type list | grep <uri>

To sync all after making many changes the example command below uses jq to collect the ids that contain https://developer-portal.com/ in the contentTypeUri and sync each one

 dc-cli content-type list --json | jq -c '.[] | select(.contentTypeUri | contains("https://developer-portal.com/"))' | jq '.id' | while read line; do dc-cli content-type sync $line; done