Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
honest: false,
conceal: false,
// flash is needed to actually play music without HTML5 DRM components
flash: true,
// we don't provide flash, due to licensing, but, you can find it inside ~/.config/google-chrome/PepperFlash/[version]/libpepflashplayer.so
flashPath: "./libpepflashplayer.so",
zoom: 1.0,
singleInstance: true,
clearCache: false,
tray: true,
verbose: true,
inject: ["./custom.js"],
globalShortcuts: "shortcuts.json",
};
nativefier(options, function(error, appPath) {
if (error) {
console.log(error.red);
return;
}
fs.copyFile('./libpepflashplayer.so', './'+appPath+'/libpepflashplayer.so', function(error) {
if(error) {
if(error.code=='ENOENT'){
console.log("Could not copy libpepflashplayer.so : Is libpepflashplayer.so in the current directory?".bold.red);
}
else {
throw error;
}
return;
}
else {
// we now need to ensure that nativefier.json is set right (sometimes the name option doesn't pass correctly)
var options = {
name: 'Google Tasks',
targetUrl: 'https://tasks.google.com/embed/?origin=https://calendar.google.com&fullWidth=1',
version: '0.0.1',
out: '.',
overwrite: true,
width: 720,
height: 900,
singleInstance: true,
icon: path.join(__dirname, 'icon.png'),
inject: [path.join(__dirname, 'preload.js')],
tray: true,
fastQuit: false,
};
nativefier(options, function (error, appPath) {
if (error) {
console.error(error);
return;
}
fs.copyFile('./icon-sm.png', './Google Tasks-darwin-x64/Google Tasks.app/Contents/Resources/app/icon.png', (err) => {
if (err) throw err;
console.log('`icon-sm.png` was copied to `Google Tasks-darwin-x64/Google Tasks.app/Contents/Resources/app/icon.png`');
});
console.log('App has been nativefied to', appPath);
});