Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
chore(utils): seperates interfaces from the core module
seperated the interfaces to a seperate file to make the code more cleaner
  • Loading branch information
pranshuchittora committed Jun 3, 2019
1 parent 6ee3c0b commit d0a4177
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
17 changes: 1 addition & 16 deletions packages/utils/modify-config-helper.ts
Expand Up @@ -5,24 +5,9 @@ import * as path from "path";
import * as yeoman from "yeoman-environment";
import * as Generator from "yeoman-generator";

import { TransformConfig } from "./types/Config";
import runTransform from "./scaffold";

export interface Config extends Object {
item?: {
name: string;
};
topScope?: string[];
configName?: string;
merge: object;
webpackOptions: object;
}

export interface TransformConfig extends Object {
configPath?: string;
configFile?: string;
config?: Config;
}

const DEFAULT_WEBPACK_CONFIG_FILENAME = "webpack.config.js";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/scaffold.ts
Expand Up @@ -5,7 +5,7 @@ import * as path from "path";
import { findProjectRoot } from "./path-utils";

import { Error } from "../init/types";
import { Config, TransformConfig } from "./modify-config-helper";
import { Config, TransformConfig } from "./types/Config";
import propTypes from "./prop-types";
import astTransform from "./recursive-parser";
import runPrettier from "./run-prettier";
Expand Down
15 changes: 15 additions & 0 deletions packages/utils/types/Config.ts
@@ -0,0 +1,15 @@
export interface Config extends Object {
item?: {
name: string;
};
topScope?: string[];
configName?: string;
merge: object;
webpackOptions: object;
}

export interface TransformConfig extends Object {
configPath?: string;
configFile?: string;
config?: Config;
}

0 comments on commit d0a4177

Please sign in to comment.