Skip to content

Instantly share code, notes, and snippets.

@rchrd2
Created July 3, 2018 05:14
Show Gist options
  • Save rchrd2/7e72a200e0a7092920035f60ddf818c5 to your computer and use it in GitHub Desktop.
Save rchrd2/7e72a200e0a7092920035f60ddf818c5 to your computer and use it in GitHub Desktop.
electron-packager associate with file type (support drag)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>txt</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>electron.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/plain</string>
</array>
<key>CFBundleTypeName</key>
<string>Text document</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>TXT</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
</array>
</dict>
</plist>
{
"name": ".",
"author": ".",
"description": ".",
"version": "0.1.0",
"dependencies": {
},
"devDependencies": {
"electron": "^2.0.3"
},
"main": "index.js",
"private": true,
"scripts": {
"start": "electron .",
"package": "electron-packager . --extend-info extra.plist"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment