UNPKG

1.55 kBJavaScriptView Raw
1/*
2 * Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5 * the License. A copy of the License is located at
6 *
7 * http://aws.amazon.com/apache2.0/
8 *
9 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
10 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11 * and limitations under the License.
12 */
13
14import { default as AmplifyCore, I18n } from 'aws-amplify';
15import dict from './AmplifyI18n';
16
17export { default as AmplifyTheme } from './AmplifyTheme';
18export { MapEntries as AmplifyMessageMapEntries } from './AmplifyMessageMap';
19export * from './AmplifyUI';
20export * from './Auth';
21export * from './API';
22export * from './Storage';
23export * from './Interactions';
24
25const configure = function(config) {
26 const msg = [
27 '',
28 '\x1b[33mWarning: Amplify.configure() is deprecated from aws-amplify-react-native.',
29 ' Please import aws-amplify package to configure AWS Amplify\x1b[0m',
30 '',
31 ' Example:',
32 '',
33 " \x1b[36mimport Amplify from 'aws-amplify';",
34 " import aws_exports from './aws-exports';",
35 '',
36 ' Amplify.configure(aws_exports)\x1b[0m',
37 '',
38 ].join('\n');
39 console.log(msg);
40 AmplifyCore.configure(config);
41};
42
43const Amplify = {
44 configure: configure,
45};
46
47export default Amplify;
48
49I18n.putVocabularies(dict);