Page History
...
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 files file(s) to ensure it no longer imports any other files:
Code Block title Replace all imports in environment.*.ts // (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 title Migrate from environment.\*.ts to config.\*.yml 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
- Finally, the old environment.*.ts config file(s) can be deleted. It is They are not used at all in 7.2 or above.
Configuration Override
...
Overview
Content Tools