How to use the rimraf.sync function in rimraf

To help you get started, we’ve selected a few rimraf 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 RisingStack / anchor / src / chart.js View on Github external
name = 'my-chart',
  description = '',
  version = '0.1.0'
}) {
  const outputTemplatePath = path.join(outputPath, 'templates')
  const filePath = path.join(outputPath, 'Chart.yaml')
  const chart = {
    apiVersion: 'v1',
    description,
    name,
    version
  }

  // Recreate folder
  if (overwrite) {
    rimraf.sync(outputPath)
    mkdirp.sync(outputPath)
  }
  mkdirp.sync(outputTemplatePath)

  return saveToYAMLFile(filePath, chart)
}
github mystorp / http-mock-middleware / tests / utils.js View on Github external
afterAll(function(){
        rimraf.sync(dir);
    });
    return mockFile.bind(this, dir);
github Crossbow-js / crossbow-sites / example-stream.js View on Github external
var crossbow = require("./");
var through = require("through2");
var fs = require("vinyl-fs");
var rimraf = require("rimraf").sync;
var outpath = "./stream-out";

rimraf(outpath);

fs.src([
    "test/fixtures/*.html",
    "test/fixtures/_posts/**"
    //"test/fixtures/docs/**",
    //"test/fixtures/projects/**"
])
.pipe(crossbow.stream({
    config: {
        base:        "test/fixtures",
        prettyUrls: true,
    },
    data: {
        work: 'dir:work'
    }
}))
github devowlio / wp-react-starter / common / Gruntfile.plugin.ts View on Github external
cwd,
                stdio: "inherit",
                shell: true
            });
        grunt.file
            .expand(
                {
                    cwd: buildPluginDir,
                    filter: "isDirectory"
                },
                "vendor/*/*"
            )
            .forEach((folder) => rebuildAutoloader(resolve(buildPluginDir, folder)));
        rebuildAutoloader(buildPluginDir);

        rimraf.sync(outputDir);
        rimraf.sync(tmpStubFile);
    });
github manuelbieh / react-ssr-setup / scripts / start.ts View on Github external
import rimraf from 'rimraf';
import paths from '../config/paths';
import { clientOnly } from './utils';

rimraf.sync(paths.clientBuild);
rimraf.sync(paths.serverBuild);

if (clientOnly()) {
    require('./start-client');
} else {
    require('./start-ssr');
}
github Graviton-Code-Editor / Graviton-App / src / javascript / market.js View on Github external
clearCache: function () {
    /*
     * @desc Clear the market cache 
     */
    const rimraf = require('rimraf')
    rimraf.sync(market_file)
    full_plugins = []
    current_plugins = 0
    plugins_market = []
    extensions.extensions = []
    closeWindow('market_window')
  }
}
github FujitsuLaboratories / escapin / src / index.ts View on Github external
private loadConfig() {
    const result = cosmiconfigSync('escapin').search(this.basePath);
    if (result === null) {
      throw new Error('config file not found.');
    }
    result.config.output_dir = Path.join(this.basePath, result.config.output_dir || OUTPUT_DIR);
    if (fs.existsSync(result.config.output_dir)) {
      rimraf(result.config.output_dir);
    }
    mkdirp(result.config.output_dir);

    result.config.platform = result.config.platform || PLATFORM;
    result.config.default_storage = result.config.default_storage || DEFAULT_STORAGE;

    this.config = result.config as IConfig;
  }
github jamesporter / solandra / pre-publish.js View on Github external
const fs = require("fs"),
  path = require("path"),
  rimraf = require("rimraf")

rimraf.sync("package")
fs.mkdirSync("package")

const mainPackage = JSON.parse(fs.readFileSync("./package.json").toString())
const version = mainPackage.version

const packageTemplate = {
  name: "solandra",
  author: "James Porter ",
  version,
  main: "index.js",
  license: "MIT",
  dependencies: {
    prando: "^5.1.1",
  },
  types: "index.d.ts",
}
github Activiti / activiti-modeling-app / jest / transpile-es2015-modules-for-jest.js View on Github external
function copyFolderSync(from, to) {
    if (fs.existsSync(to)) {
        rimraf.sync(to);
    }

    fs.mkdirSync(to);
    fs.readdirSync(from).forEach(element => {
        if (fs.lstatSync(path.join(from, element)).isFile()) {
            fs.copyFileSync(path.join(from, element), path.join(to, element));
        } else {
            copyFolderSync(path.join(from, element), path.join(to, element));
        }
    });
}

rimraf

A deep deletion module for node (like `rm -rf`)

ISC
Latest version published 4 months ago

Package Health Score

84 / 100
Full package analysis