Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
}
afterAll(function(){
rimraf.sync(dir);
});
return mockFile.bind(this, dir);
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'
}
}))
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);
});
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');
}
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')
}
}
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;
}
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",
}
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));
}
});
}