Skip to content

Commit

Permalink
chore: Reafctor config
Browse files Browse the repository at this point in the history
  • Loading branch information
ludohenin committed Feb 27, 2016
1 parent f21b02d commit 2b72463
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 3 additions & 4 deletions tools/config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import {SEED_CONFIG, ISeedConfig} from './config/seed.config';
import {PROJECT_CONFIG, IProjectConfig} from './config/project.config';

// Maintain compatibility.
export * from './config/seed/config';
interface IConfig extends ISeedConfig, IProjectConfig {}

export interface IConfig extends ISeedConfig, IProjectConfig {}
const CONFIG: IConfig = Object.assign({}, SEED_CONFIG, PROJECT_CONFIG);

export const CONFIG: IConfig = Object.assign({}, SEED_CONFIG, PROJECT_CONFIG);
export = CONFIG;
2 changes: 2 additions & 0 deletions tools/config/seed/config.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface ISeedConfig {
CSS_DEST: string;
CSS_PROD_BUNDLE: string;
DEBUG: string;
DEV_DEPENDENCIES;
DEV_DEST: string;
DIST_DIR: string;
DOCS_DEST: string;
Expand All @@ -27,6 +28,7 @@ export interface ISeedConfig {
JS_PROD_SHIMS_BUNDLE: string;
NG2LINT_RULES: string[];
PORT: number;
PROD_DEPENDENCIES;
PROD_DEST: string;
PROJECT_ROOT: string;
TMP_DIR: string;
Expand Down
6 changes: 3 additions & 3 deletions tools/tasks/project/sample.task.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {join} from 'path';
import {CONFIG} from '../../config';
import {APP_SRC, APP_DEST} from '../../config';

/**
* Sample tasks
Expand All @@ -8,7 +8,7 @@ import {CONFIG} from '../../config';

export = function sampleTask(gulp, plugins) {
return function () {
return gulp.src(join(CONFIG.APP_SRC, '**/*.ts'))
.pipe(gulp.dest(CONFIG.APP_DEST));
return gulp.src(join(APP_SRC, '**/*.ts'))
.pipe(gulp.dest(APP_DEST));
};
}

0 comments on commit 2b72463

Please sign in to comment.