Skip to content

Commit 9af64c3

Browse files
committed
Merge branch 'release/0.1.1'
2 parents 6a967bc + bc7a277 commit 9af64c3

File tree

7 files changed

+38
-19
lines changed

7 files changed

+38
-19
lines changed

generators/project/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ module.exports = yeoman.Base.extend({
5959
var origDir = process.cwd();
6060
var npmdir = path.join(process.cwd(), this.projectName);
6161
process.chdir(npmdir);
62-
this.installDependencies();
63-
process.chdir(origDir);
62+
this.installDependencies({
63+
callback: function () {
64+
process.chdir(origDir);
65+
}
66+
});
6467
}
6568
});

generators/project/templates/_package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
],
99
"dependencies": {
1010
"aws-sdk": "^2.2.36",
11-
"cfn-responder": "*",
12-
"lambda-formation": "*"
11+
"cfn-responder": "^0.1.0",
12+
"lambda-formation": "^0.1.0"
1313
}
1414
}
1515

generators/resource/index.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22
var yeoman = require('yeoman-generator');
3-
var path = require('path');
43

54
module.exports = yeoman.Base.extend({
65
prompting: {
@@ -10,7 +9,7 @@ module.exports = yeoman.Base.extend({
109

1110
var prompts = [{
1211
name: 'resourceName',
13-
message: 'What\'s the name of your project?'
12+
message: 'What\'s the name of your resource?'
1413
}];
1514

1615
this.prompt(prompts, function (props) {
@@ -42,13 +41,6 @@ module.exports = yeoman.Base.extend({
4241
this.destinationPath('lib', 'resources', this.resourceName, 'delete.js'),
4342
{resourceName: this.resourceName}
4443
);
45-
},
46-
47-
install: function () {
48-
var origDir = process.cwd();
49-
var npmdir = path.join(process.cwd(), 'lib', 'resources', this.resourceName);
50-
process.chdir(npmdir);
51-
this.installDependencies();
52-
process.chdir(origDir);
5344
}
45+
5446
});

generators/resource/templates/resource/_create.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ var create = function (err, event, context) {
1010
return util.done(err);
1111
}
1212

13-
// REPLACE THIS WITH CUSTOM RESOURCE CREATE CODE
13+
/*
14+
Here is where CREATE code should be placed.
15+
16+
Always call util.done when finished to end the lambda
17+
execution.
18+
19+
util.done(err,event,context, data, physicalResourceId)
20+
*/
21+
1422
util.done('CREATE NOT IMPLEMENTED', event, context, {}, 'ID');
1523
};
1624

generators/resource/templates/resource/_delete.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ var destroy = function (err, event, context) {
1010
return util.done(err);
1111
}
1212

13-
// REPLACE THIS WITH CUSTOM RESOURCE DELETE CODE
14-
util.done('DELETE NOT IMPLEMENTED', event, context, {}, 'ID');
13+
/*
14+
Here is where DELETE code should be placed.
15+
16+
Always call util.done when finished to end the lambda
17+
execution.
18+
19+
util.done(err,event,context, data)
20+
*/
21+
22+
util.done('DELETE NOT IMPLEMENTED', event, context, {});
1523
};
1624

1725
/* Do not change this function */

generators/resource/templates/resource/_update.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ var update = function (err, event, context) {
1010
return util.done(err);
1111
}
1212

13-
// REPLACE THIS WITH CUSTOM RESOURCE UPDATE CODE
13+
/*
14+
Here is where UPDATE code should be placed.
15+
16+
Always call util.done when finished to end the lambda
17+
execution.
18+
19+
util.done(err,event,context, data, physicalResourceId)
20+
*/
21+
1422
util.done('UPDATE NOT IMPLEMENTED', event, context, {}, 'ID');
1523
};
1624

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-lambda-formation",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Yeoman generator for creating Lambda projects compatible with CloudFormation",
55
"homepage": "",
66
"author": "kevin.mcgrath@sungardas.com",

0 commit comments

Comments
 (0)