2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-06-01 20:30:48 +00:00
Go to file
2015-07-05 17:02:25 +08:00
app Fixed enormous bug in not passing the app configuration properly 2015-07-05 16:43:32 +08:00
test Add more comprehensive tests 2015-06-28 16:57:59 -04:00
.gitignore Fixed enormous bug in not passing the app configuration properly 2015-07-05 16:43:32 +08:00
.travis.yml dont download atom-shell -- use local version instead 2015-04-04 09:47:01 -07:00
cli.js Fixed enormous bug in not passing the app configuration properly 2015-07-05 16:43:32 +08:00
collaborators.md update collaborators 2015-07-01 13:03:14 -07:00
common.js Implement multi-target options and refactor code 2015-06-28 16:57:56 -04:00
CONTRIBUTING.md Update CONTRIBUTING.md 📖 😉 2015-06-01 15:10:37 -07:00
index.js Implement multi-target options and refactor code 2015-06-28 16:57:56 -04:00
LICENSE license file 2015-06-23 10:15:19 -07:00
linux.js Implement multi-target options and refactor code 2015-06-28 16:57:56 -04:00
mac.js Implement multi-target options and refactor code 2015-06-28 16:57:56 -04:00
package.json 1.0.8 2015-07-05 17:02:25 +08:00
README.md Updated version and readme 2015-07-05 16:43:44 +08:00
tempDir.js Corrected yet another bug in creating a temporary directory 2015-07-05 17:02:09 +08:00
usage.txt Added documentation 2015-07-05 15:11:49 +08:00
win32.js Implement multi-target options and refactor code 2015-06-28 16:57:56 -04:00

Nativefier

Introduction

NPM

Package and wraps a single-page web app in an electron OS executable (.app, .exe, etc) via the command line.

Simply a fork with a small layer of abstraction on top of electron-packager for the CLI.

I did this because I was tired of having to ⌘-tab or alt-tab to my browser and then search through the numerous tabs open when I was using Whatsapp Web or Facebook Messenger.

Notes

A back button is intentionally not provided because the tool is designed for single page apps. However, if desired, an executable can built for any url, and simply pressing the backspace key will take the user back to the previous page.

Installation

# for use from cli
npm install nativefier -g

Usage

Usage: nativefier <appname> --target=<url> --platform=<platform> --arch=<arch> --version=<version>

Required options

appname            name for the app
target             target url for the single page app
platform           all, or one or more of: linux, win32, darwin (comma-delimited if multiple)
arch               all, ia32, x64
version            see https://github.com/atom/electron/releases

Example            nativefier Messenger --target=http://messenger.com --platform=darwin --arch=x64 --version=0.28.2

Optional options

all                equivalent to --platform=all --arch=all
out                the dir to put the app into at the end. defaults to current working dir
icon               the icon file to use as the icon for the app
app-bundle-id      bundle identifier to use in the app plist
app-version        version to set for the app
helper-bundle-id   bundle identifier to use in the app helper plist
ignore             do not copy files into App whose filenames regex .match this string
prune              runs `npm prune --production` on the app
overwrite          if output directory for a platform already exists, replaces it rather than skipping it
asar               packages the source code within your app into an archive
sign               should contain the identity to be used when running `codesign` (OS X only)
version-string     should contain a hash of the application metadata to be embedded into the executable (Windows only).
                   These can be specified on the command line via dot notation,
                   e.g. --version-string.CompanyName="Company Inc." --version-string.ProductName="Product"
                   Keys supported:
                   - CompanyName
                   - LegalCopyright
                   - FileDescription
                   - OriginalFilename
                   - FileVersion
                   - ProductVersion
                   - ProductName
                   - InternalName

See electron-packager for more details.

Examples

Creating a native wrapper of http://messenger.com for OSX x64:

$ nativefier Messenger --platform=darwin --arch=x64 --version=0.29.1 --target='http://messenger.com' --overwrite

Todo

  • Set the app icon from a url in the CLI
  • Set the app window dimensions from the CLI