ng2Client/gulpfile.js
// Copies '/app/settings/setup/environment-settings.ts' file to its parent folder as the given environment
Copies '/app/settings/setup/environment-settings.ts' file to its parent folder as the given environment
Copies ' / app / settings / setup / environment - settings . ts ' file to its parent folder as the given environment
function copyEnvironmentSettings(config) {
    var setupSettings = "environment-settings.ts",
        environmentSettings = config.environment + "-settings.ts";
    return pathExists(settingsRoot + "/" + environmentSettings).then(function (exists) {
        if (exists) {
            return;
        }
        var rename = require("gulp-rename");
        var setupSettingsPath = settingsRoot + "/setup/" + setupSettings;
        return gulp.src(setupSettingsPath)
            .pipe(rename(environmentSettings))
            .pipe(gulp.dest(settingsRoot));
    });
}
function copyEnvironmentSettings ( config ) { var setupSettings = "environment-settings.ts" , environmentSettings = config . environment + "-settings.ts" ; return pathExists ( settingsRoot + "/" + environmentSettings ) . then ( function ( exists ) { if ( exists ) { return ; } var rename = require ( "gulp-rename" ) ; var setupSettingsPath = settingsRoot + "/setup/" + setupSettings ; return gulp . src ( setupSettingsPath ) . pipe ( rename ( environmentSettings ) ) . pipe ( gulp . dest ( settingsRoot ) ) ; } ) ; }
Copies '/app/settings/setup/environment-settings.ts' file to its parent folder as the given environment
Copies ' / app / settings / setup / environment - settings . ts ' file to its parent folder as the given environment
// Checks whether the file(s) already being copied // No need to copy from setup, move along!