add more custom module formatter documentation

This commit is contained in:
Sebastian McKenzie 2014-10-23 09:01:29 +11:00
parent 5f8420f23e
commit ce170f7646

View File

@ -111,6 +111,8 @@ export function bar() {
## Custom
You can alternatively specify module names instead of one of the built-in types.
```javascript
module.exports = ModuleFormatter;
@ -118,6 +120,11 @@ function ModuleFormatter() {
}
ModuleFormatter.prototype.transform = function (ast) {
// this is ran after all transformers have had their turn at modifying the ast
// feel free to modify this however
};
ModuleFormatter.prototype.import = function (node, nodes) {
// node is an ImportDeclaration
};