0.1.2 • Published 6 years ago

proton-packager v0.1.2

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

proton-packager

Creates bundles for proton-native. It will download the latest node version and create a fully self-contained package.

At the moment, only Mac app bundles are supported. Contributions are welcome!

It can be installed globally or locally:

yarn add --dev proton-packager // or
npm install -D proton-packager

You can then use it on the cli via npx

npx proton-packager mac MyApp

or add a script to your package.json:

{
  "name": "my-proton-app",
  "scripts": {
    "package": "proton-packager mac MyApp -f"
  },
  ...
}
  Usage: proton-packager [options] [command]


  Commands:

    mac <AppName>  create a macOS .app bundle

  Options:

    -h, --help             output usage information
    -o, --out-dir <dir>    output folder [build]
    -s, --src <dir>        source folder [src]
    -m, --main <main>      name of the main script inside src [index.js]
    -b, --bundle <bundle>  bundle identifier [my.proton.application]
    -i, --icon <icon>      icns file to use as app icon
    -v, --version <ver>    version of the app [package.json: version]
    --no-transpile         don't transpile source files using babel
    -f, --force            overwrite old package

Examples

For a project with the structure:

my-app
├── node_modules
├── package.json
├── src
│   └── index.js
└── .babelrc

simply run

proton-packager mac MyApp

to create the app bundle MyApp.app.

For a project with the structure:

proton-test
├── node_modules
├── package.json
├── application
│   └── main.js
└── .babelrc

use

proton-packager mac MyApp -s application -m main.js