We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There are a few node modules that interact directly with the windows/OSX clipboard/pasteboard:
Windows:
OSX:
The text was updated successfully, but these errors were encountered:
There's a cross-system solution called clipboardy which can be implemented like so:
clipboardy
var fs = require('fs') var path = require('path') var exec = require('child_process').exec var argv = require('minimist')(process.argv.slice(2)) const clipboardy = require('clipboardy') fs.readFile(path.join(__dirname, 'boilerplate.html'), function read(err, data) { if (err) return console.log(err) var filePath if ((filePath = argv.f) !== undefined) { if (filePath[0] !== "/") { filePath = path.join(process.cwd(),filePath) } fs.writeFile(filePath,data.toString(), function write(err,data) { if (err) return console.log(err) console.log("Boilerplate file created at " + filePath) }) } else { clipboardy.writeSync(data.toString()) console.log('Boilerplate code copied to clipboard.') } })
Sorry, something went wrong.
No branches or pull requests
There are a few node modules that interact directly with the windows/OSX clipboard/pasteboard:
Windows:
OSX:
The text was updated successfully, but these errors were encountered: