diff --git a/README.md b/README.md index fbaf4c7..fb6838d 100644 --- a/README.md +++ b/README.md @@ -130,14 +130,12 @@ Runtime for Newfold WP modules and plugins ## Installation -### 1. Setup GitHub registry +Previously, this module's package was hosted at github and these instructions were required [GH Packages Setup](https://gist.github.com/aulisius/1a6e4961f17039d82275a6941331b021). Now the package is hosted at npmjs and this referenced setup is no longer relevant. Find the npmjs package at https://www.npmjs.com/package/@newfold/wp-module-runtime and install just as any other public package. Note the `newfold` org namespace for npmjs and the `newfold-labs` org namespace for github and satis. -Follow instructions at [GH Packages Setup](https://gist.github.com/aulisius/1a6e4961f17039d82275a6941331b021). - -### 2. Install the `@newfold-labs/wp-module-runtime` npm package. +### 1. Install the `@newfold/wp-module-runtime` npm package. ```bash -npm install @newfold-labs/wp-module-runtime +npm install @newfold/wp-module-runtime ``` ## PHP Module @@ -150,10 +148,10 @@ The PHP module can be installed only on the Brand plugin. composer config repositories.newfold composer https://newfold-labs.github.io/satis ``` -### 2. Require the `newfold-labs/wp-module-runtime` package. +### 2. Require the `newfold/wp-module-runtime` package. ```bash -composer require newfold-labs/wp-module-runtime +composer require newfold/wp-module-runtime ``` ## Usage @@ -161,7 +159,7 @@ composer require newfold-labs/wp-module-runtime In your React component you can import the runtime module as so, ```js -import { NewfoldRuntime } from "@newfold-labs/wp-module-runtime"; +import { NewfoldRuntime } from "@newfold/wp-module-runtime"; function Component(props) { if (NewfoldRuntime.hasCapability("hasYithExtended")) { @@ -193,7 +191,7 @@ Now when you use `NewfoldRuntime.sdk.my_field`, you'll see the value as `'custom As the runtime can be extended via the `newfold-runtime` filter, you can also configure the type definitions to make sure you safely access the extended values. Since `sdk` is an TS interface, it can be easily extended in the following manner. ```ts -declare module "@newfold-labs/wp-module-runtime" { +declare module "@newfold/wp-module-runtime" { export interface DefaultSdk { my_field: string; }