packages/mutate-loader/src/index.js
function installMutations(modules, enclosingFolder) {
  makeFolderLibraryIfNotExist(enclosingFolder);
  if (modules.length === 0) {
    return new Promise(resolve => resolve({}));
  }

  return npm.install(modules, {
    cwd: pathToMutations(enclosingFolder),
    save: true
  });
}
function installMutations(modules, enclosingFolder) {
  makeFolderLibraryIfNotExist(enclosingFolder);
  if (modules.length === 0) {
    return new Promise(resolve => resolve({}));
  }

  return npm.install(modules, {
    cwd: pathToMutations(enclosingFolder),
    save: true
  });
}
function installMutations ( modules , enclosingFolder ) { makeFolderLibraryIfNotExist ( enclosingFolder ) ; if ( modules . length === 0 ) { return new Promise ( resolve => resolve ( { } ) ) ; } return npm . install ( modules , { cwd : pathToMutations ( enclosingFolder ) , save : true } ) ; }
Installs a list of npm modules as "mutations" in a folder called
"mutations" using `npm`.
@param {Array} modules
@param {String} enclosingFolder
@return {Promise}
Installs a list of npm modules as mutations in a folder called mutations using npm .