Skip to content

Commit 834301e

Browse files
Publish generator-aspnetcore-spa 0.6.1
1 parent 0377425 commit 834301e

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

templates/package-builder/src/yeoman/app/index.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,21 @@ class MyGenerator extends yeoman.Base {
133133
inputFullPath = tempPath;
134134
}
135135

136-
this.fs.copyTpl(
137-
inputFullPath,
138-
destinationFullPath,
139-
this._answers
140-
);
136+
const outputDirBasename = path.basename(path.dirname(destinationFullPath));
137+
if (outputDirBasename === 'dist') {
138+
// Don't do token replacement in 'dist' files, as they might just randomly contain
139+
// sequences like '<%=' even though they aren't actually template files
140+
this.fs.copy(
141+
inputFullPath,
142+
destinationFullPath
143+
);
144+
} else {
145+
this.fs.copyTpl(
146+
inputFullPath,
147+
destinationFullPath,
148+
this._answers
149+
);
150+
}
141151
}
142152
});
143153
}

templates/package-builder/src/yeoman/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-aspnetcore-spa",
3-
"version": "0.5.0",
3+
"version": "0.6.1",
44
"description": "Single-Page App templates for ASP.NET Core",
55
"author": "Microsoft",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)