Skip to content

Commit

Permalink
Remove unnecessary files, add definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred J. Kwak committed Feb 17, 2017
1 parent 719d770 commit 1f44104
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 35 deletions.
21 changes: 9 additions & 12 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,6 @@ module.exports = Generator.extend({
generator.destinationPath('.gitignore')
);
fs.mkdirSync('.meteor');
generator.fs.copy(
generator.templatePath('.meteor/.finished-upgraders'),
generator.destinationPath('.meteor/.finished-upgraders')
);
generator.fs.copy(
generator.templatePath('.meteor/.gitignore'),
generator.destinationPath('.meteor/.gitignore')
);
generator.fs.copy(
generator.templatePath('.meteor/.id'),
generator.destinationPath('.meteor/.id')
);
generator.fs.copy(
generator.templatePath('.meteor/packages'),
generator.destinationPath('.meteor/packages')
Expand Down Expand Up @@ -124,6 +112,15 @@ module.exports = Generator.extend({
api: generator.api
}
);
if (generator.api.definitions) {
generator.fs.copyTpl(
generator.templatePath('server/definitions.js'),
generator.destinationPath('server/definitions.js'),
{
api: generator.api
}
);
}
generator.fs.copy(
generator.templatePath('server/users.js'),
generator.destinationPath('server/users.js')
Expand Down
15 changes: 0 additions & 15 deletions generators/app/templates/.meteor/.finished-upgraders

This file was deleted.

1 change: 0 additions & 1 deletion generators/app/templates/.meteor/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions generators/app/templates/.meteor/.id

This file was deleted.

3 changes: 3 additions & 0 deletions generators/app/templates/server/definitions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Api from './api'; <% if(api.definitions) { %>
Api.swagger.definitions = <%-JSON.stringify(api.definitions, null, 2)%>
<% } %>

0 comments on commit 1f44104

Please # to comment.