Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Don't delete src/environments/environment.*.ts

...

  1. 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
    titleReplace 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'
    }


  2. Now, you are ready to run the "yarn env:yaml" command to transform this old configuration into the new format.  

    Code Block
    titleMigrate 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


  3. Finally, you should replace the old environment.*.ts config file(s) can be deleted. They are not used at all in 7.2 or above.with the stock versions.  They continue to provide default configuration values, but customization should be done in the YAML files.

Configuration Override

In 7.2 or above

...

Code Block
titleFormat for 7.1 or 7.0 (environment.*.ts)
// NOTE: will log all redux actions and transfers in console
debug: false