Skip to content

Commit

Permalink
REFACTORING-2 : add asset replacer into generate process strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
thomrick committed Sep 7, 2017
1 parent 48c1bb5 commit 9388bb0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import {Asset} from '../../assets/impl/asset';
import {ExtensionType} from '../../extensions/extension.type';
import {AssetReplacer} from '../../replacers/impl/asset.replacer';
import {ImplementationTemplateLoader} from '../../template-loaders/impl/implementation.template-loader';
import {IProcessInputs, IProcessStrategy} from '../process-strategy.interface';

export class GenerateProcessStrategy implements IProcessStrategy {
constructor() {}

public async process(inputs?: IProcessInputs): Promise<void> {
public async process(inputs: IProcessInputs): Promise<void> {
const asset: Asset = new Asset(
inputs.arguments.assetType,
ExtensionType.TYPESCRIPT,
inputs.arguments.assetName,
inputs.arguments.moduleName,
);
await new ImplementationTemplateLoader(asset).load();
const content: string = await new ImplementationTemplateLoader(asset).load();
const replacedContent: string = new AssetReplacer(asset).replace(content);
}

}

0 comments on commit 9388bb0

Please sign in to comment.