pull/7738/head
Rich-Harris 9 years ago
parent e85c5deae1
commit 4380a51815

@ -16,7 +16,7 @@ fs.readdirSync( __dirname ).forEach( file => {
ast.body.forEach( node => { ast.body.forEach( node => {
if ( node.type !== 'ExportNamedDeclaration' ) return; if ( node.type !== 'ExportNamedDeclaration' ) return;
const { declaration } = node; const declaration = node.declaration;
if ( !declaration ) return; if ( !declaration ) return;
const name = declaration.type === 'VariableDeclaration' ? const name = declaration.type === 'VariableDeclaration' ?
@ -27,8 +27,7 @@ fs.readdirSync( __dirname ).forEach( file => {
declaration.declarations[0].init : declaration.declarations[0].init :
declaration; declaration;
const { start, end } = value; declarations[ name ] = source.slice( value.start, value.end );
declarations[ name ] = source.slice( start, end );
}); });
}); });

Loading…
Cancel
Save