Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
rebuild() {
fs.rmdirSync(this.outputPath);
// TODO: investigate if we can use rename the directory instead to improve performance on
// Windows
symlinkOrCopy.sync(this.inputPath, this.outputPath);
}
function symlinkOrCopyFromCache(entry, dest, relativePath) {
try {
symlinkOrCopySync(entry.cacheFile, dest + '/' + relativePath);
} catch(err) {
if (err.code === 'ENOENT') {
// assume that the destination directory is missing create it and retry
mkdirp.sync(path.dirname(entry.outputFile))
symlinkOrCopySync(entry.cacheFile, dest + '/' + relativePath)
} else {
throw err;
}
}
}
return sander.mkdir(outputdir, path.dirname(file)).then(function () {
var src = inputdir + path.sep + file;
var dest = outputdir + path.sep + file;
// TODO sander-esque symlinkOrCopy
symlink_or_copy.sync(src, dest);
});
});
build() {
super.build();
for (let i = 0; i < this.inputPaths.length; i++) {
symlinkOrCopySync(this.inputPaths[i], this.outputPath + '/' + i);
}
}
};
['modern', 'outdated'].forEach(function(inRepoAddon) {
var source = path.resolve(__dirname, '..', 'lib/');
var target = path.resolve(__dirname, '..', 'tests/dummy/lib', inRepoAddon, 'node_modules/ember-browserify/lib/');
console.log('rimraf', target);
rimraf.sync(target);
console.log('symlink', source, target)
symlinkOrCopy.sync(source, target);
});
build() {
if (this._shouldSync) {
let treeSync = this._sync;
if (!treeSync) {
treeSync = this._sync = new TreeSync(this.inputPaths[0], this._debugOutputPath);
}
treeSync.sync();
}
if (!this._haveLinked) {
fs.rmdirSync(this.outputPath);
symlinkOrCopy.sync(this.inputPaths[0], this.outputPath);
this._haveLinked = true;
}
}
};
build() {
if (!this.hasLinked) {
fs.rmdirSync(this.outputPath);
symlinkOrCopy.sync(this.inputPaths[0], this.outputPath);
this.hasLinked = true;
}
}
}
build() {
if (!this._inputNodes.length) {
throw new Error(`BroccoliBridge placeholder '${this.name}' was never fulfilled.`);
}
if (!this._hasLinked) {
fs.removeSync(this.outputPath);
symlinkOrCopy.sync(this.inputPaths[0], this.outputPath);
this._hasLinked = true;
}
}
}
link(ctx) {
symlinkSync(ctx.installPath, path.join(process.cwd(), 'current'));
const instance = this.system.getInstance();
instance.version = ctx.version;
instance.cliVersion = this.system.cliVersion;
}
}
function outputFileSync(sourcePath, destPath) {
var dirname = path.dirname(destPath);
fse.mkdirsSync(dirname, { fs: fs });
symlinkOrCopySync(sourcePath, destPath);
}
function pathOverwrittenError(path) {