Skip to content

Commit

Permalink
feature(header) add infos in header when build was done in test mode
Browse files Browse the repository at this point in the history
  • Loading branch information
topheman committed Aug 23, 2015
1 parent e97b4cd commit f2d269f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion gulp/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import moment from 'moment';
import pkg from '../package.json';
import gitRev from 'git-rev-sync';

import {ENV} from './utils.js';

export const DEFAULT_SERVER_PORT = 9000;

var infos = {
Expand Down Expand Up @@ -40,7 +42,17 @@ var tpl = [
'@author <%= (pkg.author && pkg.author.name) ? pkg.author.name : pkg.author %>',
'@copyright <%= year %>(c) <%= (pkg.author && pkg.author.name) ? pkg.author.name : pkg.author %>',
'@license <%= pkg.license %>'
].join('\n * ');
];

if(ENV === 'test'){
tpl = [].concat(tpl,
'',
'THIS IS A TEST VERSION',
'This version is not meant for production but for testing purpose only'
);
}

tpl = tpl.join('\n * ');

/**
* The banner is the comment that is placed at the top of our compiled
Expand Down
2 changes: 1 addition & 1 deletion gulp/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import usemin from 'gulp-usemin';
import inject from 'gulp-inject';
import runSequence from 'run-sequence';

import {LOG, COLORS} from '../utils';
import {BANNER, BANNER_HTML} from '../const';
import {LOG, COLORS} from '../utils';
import paths from '../paths';

//=============================================
Expand Down

0 comments on commit f2d269f

Please sign in to comment.