-
Notifications
You must be signed in to change notification settings - Fork 52
/
index.js
30 lines (25 loc) · 986 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import '~/utils/define';
import { CacheManager } from '@georstat/react-native-image-cache';
import { AppRegistry } from 'react-native';
import { Dirs } from 'react-native-file-access';
import { name } from './app.json';
import dayjs from 'dayjs';
import App from '~/App';
import * as packageJson from './package.json';
require('dayjs/locale/zh-cn');
// https://day.js.org/docs/en/plugin/advanced-format
dayjs.extend(require('dayjs/plugin/advancedFormat'));
// https://day.js.org/docs/zh-CN/plugin/custom-parse-format
dayjs.extend(require('dayjs/plugin/customParseFormat'));
// https://day.js.org/docs/zh-CN/i18n/changing-locale
dayjs.locale('zh-cn');
process.env.NAME = name;
process.env.VERSION = 'v' + packageJson.version;
process.env.PUBLISH_TIME = packageJson.publishTime;
CacheManager.config = {
baseDir: `${Dirs.CacheDir}/images_cache/`,
cacheLimit: 0,
sourceAnimationDuration: 500,
thumbnailAnimationDuration: 500,
};
AppRegistry.registerComponent(name, () => App);