Page History
...
If you are upgrading from 7.0 or 7.1 to 7.2 (or later), you will either need to migrate your old configuration file (from Typescript to YAML) or start fresh. You can migrate your old (7.0 or 7.1) "environment.*.ts" configuration file to the new "config.*.yml" format (see below).
Migrate environment file to YAML
These instructions will allow you to migrate your old (7.0 or 7.1) "environment.*.ts" configuration file to the new "config.*.yml" format.
First, you will need to make minor modifications to the old "environment.*.ts" configuration file(s) to ensure it no longer imports any other files:
Code Block | ||
---|---|---|
| ||
// (1) FIRST, you must comment out or remove all 4 imports at the top of the file. For example:
//import { GlobalConfig } from '../config/global-config.interface';
//import { NotificationAnimationsType } from '../app/shared/notifications/models/notification-animations-type';
//import { BrowseByType } from '../app/browse-by/browse-by-switcher/browse-by-decorator';
//import { RestRequestMethod } from '../app/core/data/rest-request-method';
// (2) SECOND, replace those 4 imported objects with these 4 objects.
// Paste this code at the top of the file where those imports were.
interface GlobalConfig { }
enum NotificationAnimationsType {
Fade = 'fade',
FromTop = 'fromTop',
FromRight = 'fromRight',
FromBottom = 'fromBottom',
FromLeft = 'fromLeft',
Rotate = 'rotate',
Scale = 'scale'
}
enum BrowseByType {
Title = 'title',
Metadata = 'metadata',
Date = 'date'
}
enum RestRequestMethod {
GET = 'GET',
POST = 'POST',
PUT = 'PUT',
DELETE = 'DELETE',
OPTIONS = 'OPTIONS',
HEAD = 'HEAD',
PATCH = 'PATCH'
} |
Now, you are ready to run the "yarn env:yaml" command to transform this old configuration into the new format.
Code Block | ||
---|---|---|
| ||
yarn env:yaml [relative-path-to-environment.ts] [optional-relative-path-to-YAML]
# For example, from the 7.2 (or above) root directory, run this:
# yarn env:yaml relative/path/to/old/environment.prod.ts config/config.prod.yml |
...
link above).
Configuration Override
In 7.2 or above
...