docs: function exit(path) {
            /*istanbul ignore next*/
            var _this = this;
            var needsTheWrap = true;
  
            if (this.ran) return;
            this.ran = true;
  
            path.traverse(amdVisitor, this);
  
            var params = this.sources.map(function (source) /*istanbul ignore next*/{
              return source[0];
            });
            var sources = this.sources.map(function (source) /*istanbul ignore next*/{
              return source[1];
            });
  
            sources = sources.concat(this.bareSources.filter(function (str) {
              return ! /*istanbul ignore next*/_this.sourceNames[str.value];
            }));
  
            var moduleName = this.getModuleName();
            if (moduleName) moduleName = t.stringLiteral(moduleName);
  
            /*istanbul ignore next*/var node = path.node;
            const firstNode = node.body.shift();
            if (firstNode.expression &&
                firstNode.expression.callee &&
                firstNode.expression.callee.object.name === 'Object' &&
                firstNode.expression.callee.property.name === 'defineProperty'
            ) {
              // NOTE: We are processing an ES6 module with at least an export
              node.body.unshift({
                'type': 'VariableDeclaration',
                'declarations': [
                  {
                    'type': 'VariableDeclarator',
                    'id': {
                      'type': 'Identifier',
                      'name': 'exports'
                    },
                    'init': {
                      'type': 'ObjectExpression',
                      'properties': []
                    }
                  }
                ],
                'kind': 'var'
              });
  
              // NOTE: This limits us to just one export per module, but it is
              // necessary to keep retrocompatibility with the current codebase
              node.body.push({
                'type': 'ReturnStatement',
                  'argument': {
                    'type': 'Identifier',
                    'name': 'exports.default'
                  }
                })
            } else {
              node.body.unshift(firstNode);
  
              if (!sources.length) {
                // NOTE: We are not an ES6 module at all. Must remove the wrapper.
                needsTheWrap = false;
              }
            }
  
            var factory = buildFactory({
              PARAMS: params,
              BODY: node.body
            });
            factory.expression.body.directives = node.directives;
            node.directives = [];
  
            if (needsTheWrap) {
              node.body = [buildDefine({
                MODULE_NAME: moduleName,
                SOURCES: sources,
                FACTORY: factory
              })];
            }
          }