hacksparrow/insert-line

Did not provide atSync() API

Closed this issue · 1 comments

It seems insert-line did not provide atSync() API. It only provde at() API. Which I use atSync() API as below, it will throw 'TypeError: (0 , _insertLine2.default)(...).content(...).atSync is not a function' error!

const pwd = getCurrentDir();
insertLine(`${pwd}/test/fileToInsertLine.js`)
      .content('import loadTest from "bundle-loader?lazy!../src/pages/Test";')
      .atSync(7).then(() => {
       });

Check the latest document in Git, need to use contentSync().at(). So it is good that you can update the document in NPM!