Skip to content

Commit

Permalink
Clean up gulpfile.js excessive logging and lack of templates
Browse files Browse the repository at this point in the history
  • Loading branch information
april committed Jun 23, 2020
1 parent 8924a41 commit 0def6dd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const paths = {

let environment = process.env.NODE_ENV || 'development';

const configFile = JSON.parse( fs.readFileSync( 'config/' + environment + '.json', 'utf8' ) );
const configFile = JSON.parse( fs.readFileSync( `config/${environment}.json`, 'utf8' ) );
const packageJSON = JSON.parse( fs.readFileSync( 'package.json', 'utf8' ) );
const config = Object.assign( configFile, packageJSON );

Expand All @@ -43,11 +43,13 @@ config.revision = process.env.GITHUB_SHA || require( 'child_process' ).execSync(
config.build_date = new Date().toISOString().substr( 0, 16 );

// set the full url to the cdn
config['cdn'] = environment === 'local' ? `http://${config.cdn_domain}` : `https://${config.cdn_domain}/nlx/${config.revision}`;
config.cdn = environment === 'local' ? `http://${config.cdn_domain}` : `https://${config.cdn_domain}/nlx/${config.revision}`;

console.log( config );
// set the environmental variable so that the sanity check can run
console.log( `Setting $CDN_BASE_URL to: ${config.cdn}` );
process.env.CDN_BASE_URL = config.cdn;

console.log( 'Environment “' + environment + '” identified. Building NLX with ' + environment + ' config:' );
console.log( `Building NLX with ${environment}, config:` );
console.log( '---------------------------Begin configuration.---------------------------' );
console.log( config );
console.log( '---------------------------End configuration.---------------------------' );
Expand Down

0 comments on commit 0def6dd

Please sign in to comment.