本文整理汇总了TypeScript中clipboardy.writeSync函数的典型用法代码示例。如果您正苦于以下问题:TypeScript writeSync函数的具体用法?TypeScript writeSync怎么用?TypeScript writeSync使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了writeSync函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Copy
public static Copy(text: string) {
try {
clipboardy.writeSync(text);
} catch (e) {
Logger.error(e, `Clipboard: Error copying to clipboard. Error=${e}`);
}
}
示例2: clipboardCopy
export function clipboardCopy(text: string) {
// Set utf-8 if on macOS
if (process.platform === 'darwin') {
process.env.LANG = 'en_US.UTF-8';
}
clipboardy.writeSync(text);
}
示例3: slug
.then((story: IStory) => {
const id = story.id;
const storySlug = slug(story.name).toLowerCase();
const gitCmd = `git checkout -b ${story.story_type}/ch${id}/${storySlug}`;
console.info(Chalk.green(`Successfully created a story with id ${id}`));
console.info("You can view your story at " + link(`https://app.clubhouse.io/story/${id}`));
console.info("To start working on this story (copied to clipboard): " + Chalk.bold(gitCmd));
writeSync(gitCmd);
return story;
})
示例4: clipboardCopy
export function clipboardCopy(text: string) {
clipboardy.writeSync(text);
}
示例5: Copy
public static Copy(text: string) {
clipboardy.writeSync(text);
}