How to use the fs-jetpack.remove function in fs-jetpack

To help you get started, we’ve selected a few fs-jetpack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pathephone / pathephone-desktop / src / main / methods / withEnvironment.js View on Github external
const withEnvronment = () => {
  const userDataPath = app.getPath('userData');
  const nextDataPath = path.resolve(
    userDataPath, `../Pathephone${!IS_PRODUCTION ? ` (${ENVIRONMENT})` : ''}`,
  );
  if (IS_TESTING) {
    jetpack.remove(nextDataPath);
  }
  app.setPath('userData', nextDataPath);

  if (IS_DEVELOPMENT) {
    app.commandLine.appendSwitch('remote-debugging-port', '9223');
    // require('electron-debug')({showDevTools: true})
    require('electron-context-menu')({}); // eslint-disable-line global-require
  }
};
github citycide / trilogy / tests / issues / boolean-to-string.js View on Github external
test.after.always('remove test database file', () => remove(filePath))
github gaccettola / mortis / client_desktop / source / gulp / build.js View on Github external
function prune_task ( )
{
    jetpack.remove ( './build/node_modules/sqlite3/build/'              );
    jetpack.remove ( './build/node_modules/sqlite3/deps/'               );
    jetpack.remove ( './build/node_modules/sqlite3/src/'                );
    jetpack.remove ( './build/node_modules/sqlite3/lib/binding/node-*'  );
}
github biati-digital / glightbox / development / package.js View on Github external
const tmpfolder = path.join(os.tmpdir(), 'glightbox-master');

    await updateIndexVersion(args[0]);
    await updatePackageVersion(args[0]);

    jetpack.copy(folder, tmpfolder, {
        matching: ['!node_modules', '!node_modules/**/*', '!.git', '!.git/**/*', '!.github', '!.github/**/*', '!.vscode', '!.vscode/**/*', '!*.psd', '!.DS_Store']
    });
    notify('Created folder', `Created folder correctly`);

    const zip = await createZip(tmpfolder).catch(error => {
        jetpack.remove(tmpfolder);
    });

    const folderName = path.basename(folder);
    jetpack.remove(tmpfolder);
    jetpack.move(zip, path.join(folder, folderName +'-master.zip'));

    notify('Done', `Packaging process ended correctly`);
}
createFolder();
github ebu / pi-list / apps / listwebserver / controllers / capture.js View on Github external
.then(() => {
                    jetpack.remove(captureOptions.file);
                    res.status(HTTP_STATUS_CODE.SUCCESS.CREATED).send();
                    next();
                })
                .catch((e) => {
github NorthMcCormick / Polyonic / tasks / build / build.js View on Github external
destDir.dirAsync('.', { empty: true }).then(function() {
    return jetpack.remove('output');
  }).then(function() {
    done();