From 2705894ad16e1890b63f7875543f224bfa8329b2 Mon Sep 17 00:00:00 2001 From: "pravgupt@amazon.com" Date: Fri, 13 Mar 2020 16:50:21 -0700 Subject: [PATCH] Update docs as per https://github.com/aws-amplify/amplify-js/pull/5085 to import providers and types from the root package --- js/predictions.md | 3 +-- js/pubsub.md | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/js/predictions.md b/js/predictions.md index 1903d48fbc3..bb6de85cd1a 100644 --- a/js/predictions.md +++ b/js/predictions.md @@ -879,7 +879,7 @@ Update the `src/polyfills.ts` and add to the top of the file `(window as any).gl ```javascript import { Component } from '@angular/core'; import Predictions from '@aws-amplify/predictions'; -import { TextToSpeechOutput } from '@aws-amplify/predictions/lib/types'; +import { TextToSpeechOutput } from '@aws-amplify/predictions'; @Component({ selector: 'app-home', @@ -1386,4 +1386,3 @@ Analyze text to find key phrases, sentiment (positive, negative, neutral), or th }).then(result => console.log(JSON.stringify(result, null, 2))) .catch(err => console.log(JSON.stringify(err, null, 2))) ``` - diff --git a/js/pubsub.md b/js/pubsub.md index 21f7806e8af..fa8c926d01b 100644 --- a/js/pubsub.md +++ b/js/pubsub.md @@ -19,7 +19,7 @@ To use in your app, import `AWSIoTProvider`: ```javascript import Amplify, { PubSub } from 'aws-amplify'; -import { AWSIoTProvider } from '@aws-amplify/pubsub/lib/Providers'; +import { AWSIoTProvider } from '@aws-amplify/pubsub'; ``` Define your endpoint and region in your configuration: @@ -75,7 +75,7 @@ Import PubSub module and related service provider plugin to your app: ```javascript import { PubSub } from 'aws-amplify'; -import { MqttOverWSProvider } from "@aws-amplify/pubsub/lib/Providers"; +import { MqttOverWSProvider } from "@aws-amplify/pubsub"; ``` To configure your service provider with a service endpoint, add following code: