From ce170f76460d0e6b1a4210d03aa42fd1bef7d942 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 23 Oct 2014 09:01:29 +1100 Subject: [PATCH] add more custom module formatter documentation --- MODULES.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MODULES.md b/MODULES.md index 8f8980169c..69a63e483e 100644 --- a/MODULES.md +++ b/MODULES.md @@ -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 };