Skip to content

Commit

Permalink
change message - options.format cannot be missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Aug 11, 2017
2 parents 2395452 + 7df44de commit f64babd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Bundle.js
Expand Up @@ -502,10 +502,10 @@ export default class Bundle {

const finalise = finalisers[ options.format ];
if ( !finalise ) {
error( {
error({
code: 'INVALID_OPTION',
message: `You must specify an output type - valid options are ${keys( finalisers ).join( ', ' )}`
} );
message: `Invalid format: ${options.format} - valid options are ${keys( finalisers ).join( ', ' )}`
});
}

timeStart( 'render format' );
Expand Down
4 changes: 1 addition & 3 deletions src/rollup/index.js
Expand Up @@ -98,13 +98,11 @@ export default function rollup ( options ) {
}

if ( !options.format ) {
error({ // TODO make this an error
error({
code: 'MISSING_FORMAT',
message: `You must supply an output format`,
url: `https://github.com/rollup/rollup/wiki/JavaScript-API#format`
});

options.format = 'es';
}

checkAmd( options );
Expand Down

0 comments on commit f64babd

Please sign in to comment.