Skip to content

Commit

Permalink
feat(cli): switch .template to .ejs (#996)
Browse files Browse the repository at this point in the history
* feat(cli): switch .template to .ejs

* revert: undo removing dist6 from templates
  • Loading branch information
virkt25 committed Feb 15, 2018
1 parent baf9928 commit a27e856
Show file tree
Hide file tree
Showing 18 changed files with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/cli/lib/project-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module.exports = class ProjectGenerator extends BaseGenerator {
rename(function(file) {
// extname already contains a leading '.'
const fileName = `${file.basename}${file.extname}`;
const result = fileName.match(/(.+)(.ts|.js)\.template$/);
const result = fileName.match(/(.+)(.ts|.json|.js|.md)\.ejs$/);
if (result) {
file.extname = result[2];
file.basename = result[1];
Expand Down Expand Up @@ -210,7 +210,7 @@ module.exports = class ProjectGenerator extends BaseGenerator {
);

if (!this.projectInfo.tslint) {
this.fs.delete(this.destinationPath('tslint.*json'));
this.fs.delete(this.destinationPath('tslint.*json.ejs'));
}

if (!this.projectInfo.prettier) {
Expand All @@ -219,11 +219,11 @@ module.exports = class ProjectGenerator extends BaseGenerator {

if (!this.projectInfo.loopbackBuild) {
this.fs.move(
this.destinationPath('package.plain.json'),
this.destinationPath('package.json')
this.destinationPath('package.plain.json.ejs'),
this.destinationPath('package.json.ejs')
);
} else {
this.fs.delete(this.destinationPath('package.plain.json'));
this.fs.delete(this.destinationPath('package.plain.json.ejs'));
}

if (!this.projectInfo.mocha) {
Expand Down

0 comments on commit a27e856

Please sign in to comment.