Skip to content

Commit

Permalink
fix #25
Browse files Browse the repository at this point in the history
  • Loading branch information
dkelosky committed Mar 17, 2018
1 parent fc03407 commit 9fa432f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/processor/Processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ export class Processor {

// add third party dependencies
Dependencies.THIRD_PARTY_DEPENDENCIES.forEach((dependency) => {
dependency.targetDir = resultDir + dependency.targetDir;
Processor.addThirdParty(dependency);
// dependency.targetDir = resultDir + dependency.targetDir;
const updatedDependency = Object.assign({}, ...[dependency]);
updatedDependency.targetDir = resultDir + dependency.targetDir;
Processor.addThirdParty(updatedDependency);
});

// log complete
Expand Down Expand Up @@ -154,9 +156,9 @@ export class Processor {
* @param {IThirdPartyDependency} dependency - a dependency to add
* @memberof Processor
*/
private static addThirdParty(dependency: IThirdPartyDependency) {
private static async addThirdParty(dependency: IThirdPartyDependency) {
const location = require.resolve(dependency.requireDir + dependency.file);
IO.writeFile(dependency.targetDir + dependency.file, IO.readFileSync(location));
await IO.writeFile(dependency.targetDir + dependency.file, IO.readFileSync(location));
}

/**
Expand Down

0 comments on commit 9fa432f

Please sign in to comment.