mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
8 years ago
4 changed files with 25 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||||
|
import relative from 'require-relative'; |
||||
|
import handleError from './handleError.js'; |
||||
|
|
||||
|
export default function () { |
||||
|
try { |
||||
|
const init = relative( 'rollup-init', process.cwd() ); |
||||
|
init( process.cwd() ); |
||||
|
} catch ( err ) { |
||||
|
if ( err.code === 'MODULE_NOT_FOUND' ) { |
||||
|
err.code = 'ROLLUP_INIT_NOT_INSTALLED'; |
||||
|
} |
||||
|
|
||||
|
handleError( err ); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue