本文整理汇总了TypeScript中fs-extra.copy函数的典型用法代码示例。如果您正苦于以下问题:TypeScript copy函数的具体用法?TypeScript copy怎么用?TypeScript copy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了copy函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: copy
const copyI18next = () => copy(join(__dirname, 'node_modules', 'i18next', 'dist'), join(root, 'i18next'));
开发者ID:wavesplatform,项目名称:WavesGUI,代码行数:1,代码来源:gulpfile.ts
示例2: copy
cb2 => copy(resolve(pack.path, pack.sprite.file), join(dir, filename), cb2),
开发者ID:julianlam,项目名称:nodebb-plugin-emoji,代码行数:1,代码来源:build.ts
示例3: basename
electronFiles.forEach((path) => {
const name = basename(path);
forCopy.push(copy(path, join(targetPath, name)));
});
开发者ID:wavesplatform,项目名称:WavesGUI,代码行数:4,代码来源:gulpfile.ts
示例4: Promise
return new Promise((resolve, reject) => {
fsExtra.copy(target, path.resolve(destination), err => {
if (err) return reject(err);
resolve();
});
});
开发者ID:WinGood,项目名称:platform,代码行数:6,代码来源:util.ts
示例5: task
task(`copy-${taskPostfix}`, copyDeps, function (done) {
const reg = new RegExp(`(.*?\\${sep}src)`);
let forCopy = JSON_LIST.map((path) => {
return copy(path, path.replace(reg, `${targetPath}`));
}).concat(
copy(join(__dirname, 'src/fonts'), `${targetPath}/fonts`),
meta.exportPageVendors.map(p => copy(join(__dirname, p), join(targetPath, p)))
);
forCopy.push(copy(join('dist', 'locale'), join(targetPath, 'locales')));
forCopy.push(copy(join(__dirname, 'tradingview-style'), join(targetPath, 'tradingview-style')));
if (buildName === 'desktop') {
const electronFiles = getFilesFrom(join(__dirname, 'electron'), '.js');
electronFiles.forEach((path) => {
const name = basename(path);
forCopy.push(copy(path, join(targetPath, name)));
});
forCopy.push(copy(join(__dirname, 'electron', 'icons'), join(targetPath, 'img', 'icon.png')));
forCopy.push(copy(join(__dirname, 'electron', 'waves.desktop'), join(targetPath, 'waves.desktop')));
forCopy.push(copy(join(__dirname, 'node_modules', 'i18next', 'dist'), join(targetPath, 'i18next')));
}
Promise.all([
Promise.all(meta.copyNodeModules.map((path) => {
return copy(join(__dirname, path), join(targetPath, path));
})) as Promise<any>,
copy(join(__dirname, 'src/img'), `${targetPath}/img`).then(() => {
const images = IMAGE_LIST.map((path) => path.replace(reg, ''));
return writeFile(join(targetPath, 'img', 'images-list.json'), JSON.stringify(images));
}),
copy(tmpCssPath, join(targetPath, 'css')),
copy('LICENSE', join(`${targetPath}`, 'LICENSE')),
copy('googleAnalytics.js', join(`${targetPath}`, 'googleAnalytics.js')),
copy('amplitude.js', join(`${targetPath}`, 'amplitude.js')),
].concat(forCopy)).then(() => {
done();
}, (e) => {
done(e);
});
}
开发者ID:wavesplatform,项目名称:WavesGUI,代码行数:41,代码来源:gulpfile.ts
注:本文中的fs-extra.copy函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论