Skip to content

Commit

Permalink
Merge pull request #13 from vkkis93/fix/shortcut
Browse files Browse the repository at this point in the history
Fix/shortcut
  • Loading branch information
vkkis93 authored Mar 5, 2018
2 parents 649bebf + 32cc489 commit 3220ec4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- [Usage](#usage)
- [Run plugin](#run-plugin)
- [What does plugin support](#what-does-plugin-support)
- [Usage with serverless-wepback](#usage-with-serverless-webpack)


# Install
Using NPM:
Expand Down Expand Up @@ -122,13 +124,27 @@ By default `process.env.STEP_IS_OFFLINE = true`.
| ***Fail***| Cause, Error|
| ***Succeed***| |

### Usage with serverless-webpack

The plugin integrates very well with [serverless-webpack](https://github.com/serverless-heaven/serverless-webpack).

Add the plugins `serverless-webpack` to your `serverless.yml` file and make sure that `serverless-webpack`
precedes `serverless-step-functions-offline` as the order is important:
```yaml
plugins:
...
- serverless-webpack
...
- serverless-step-functions-offline
...
```

### TODOs
- [x] Support context object
- [x] Improve performance
- [x] Fixing bugs
- [x] Support Pass, Fail, Succeed
- [x] Integration with serverless-webpack
- [ ] Add unit tests - to make plugin stable (next step)
- [ ] Support fields *Retry*, *Catch*
- [ ] Support other languages except node.js
Expand Down
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class StepFunctionsOfflinePlugin {
this.location = process.cwd();
this.serverless = serverless;
this.options = options;
this.stateMachine = this.options.stateMachine || this.options.s;
this.stateMachine = this.options.stateMachine;
this.detailedLog = this.options.detailedLog || this.options.l;
this.eventFile = this.options.event || this.options.e;
this.functions = this.serverless.service.functions;
Expand All @@ -35,7 +35,6 @@ class StepFunctionsOfflinePlugin {
options: {
stateMachine: {
usage: 'The stage used to execute.',
shortcut: 's',
required: true
},
event: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-step-functions-offline",
"version": "2.0.0",
"version": "2.0.1",
"description": "Serverlesss plugin to support step function offline",
"main": "index.js",
"author": "viktor.kis <[email protected]>",
Expand Down

0 comments on commit 3220ec4

Please sign in to comment.