Skip to content

Commit

Permalink
describe how to wrap in a angular factory
Browse files Browse the repository at this point in the history
  • Loading branch information
dvberkel committed Mar 20, 2014
1 parent bed2555 commit f9ea3cb
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Expand Up @@ -104,6 +104,27 @@ grunt.initConfig({
})
```

#### Wrap in an Angular Factory

It is also possible to wrap the generated parser in an Angular
factory.

```js
grunt.initConfig({
peg: {
options: { trackLineAndColumn: true },
example : {
src: "grammar/example.peg",
dest: "grammar/example.js",
angular: {
module: "pegjs",
factory: "exampleParser"
}
}
}
})
```

##### Note on plugins

If you want to pass plugins to PEG.js make sure that the plugin is
Expand Down

0 comments on commit f9ea3cb

Please sign in to comment.