nwjs-macappstore-builder

2019-08-14 admin

nwjs-macappstore-builder是什么

什么是nwjs-macappstore-builder,Easily build and publish NW.js apps on the Mac App Store.

nwjs-macappstore-builder使用教程帮助文档

Version Downloads Dependencies devDependencies

NW.js Mac App Store Builder

Icon

This node module has been made to easily build and publish NW.js apps on the Mac App Store.

It automates all the steps described in Publishing NW.js apps on the Mac App Store: a detailed guide.


  • Installation
  • Configuration
  • Programmatic usage
  • CLI usage
  • Changelog
  • License
  • Credits

Installation

Install with npm:

npm install -g nwjs-macappstore-builder

Configuration

The configuration of the tool uses a standard JS object:

var config = {

    // Build paths
    nwjs_path: '/Applications/nwjs.app', // Last build tested with NW.js 0.12.2
    source_path: '/Users/johan/Github/my-nwjs-project/app', // App root (the dir with the package.json file)
    build_path: '/Users/johan/Desktop', // Destination dir of the .app build

    // App informations
    name: 'Your App',
    bundle_id: 'com.yourcompanyname.yourapp',
    version: '1.4.8',
    bundle_version: '148',
    copyright: '© Sample copyright',
    icon_path: '/Users/johan/Github/my-nwjs-project/icon.icns',

    // Signing configuration
    identity: 'LK12345678', // Application signing
    identity_installer: 'LK12345679', // Application installer signing (may be the same as identity)
    entitlements: [
      'com.apple.security.network.client',
      'com.apple.security.assets.movies.read-only'
    ],

    // App categories
    app_category: 'public.app-category.utilities',
    app_sec_category: 'public.app-category.productivity',

    // Additional keys to add in the Info.plist file (optional, remove if not needed)
    plist: {
        NSSampleProperty1: 'Property value 1',
        NSSampleProperty2: {
            NSSub1: 'Sub-property value 1',
            NSSub2: 'Sub-property value 1'
        }
    }

    // Optimization
    uglify_js: true // Uglifies all JS files found in the app (default is FALSE)
}

Programmatic usage

Just require the module and fire the build function.

var Builder = require('nwjs-macappstore-builder');
var show_output = true;

var builder = new Builder();
builder.build(config, function(error, app_path)
{
    console.log(error ? error.message : 'Build done: ' + app_path);
}, show_output);

CLI usage

Each parameter of the config can be passed as a parameter:

nwjs-macappstore-builder --name=YourApp --bundle_id=com.yourcompanyname.yourapp [...]

As there are a lot of parameters, you may prefer this more readable alternative:

nwjs-macappstore-builder --config=/Users/johan/Desktop/build-config.json

The build-config.json file being a JSON object containing all the parameters described above.

Changelog

Version Date Notes
3.1.6 2016-05-09 Displays a warning on minification error & updates dependencies
3.1.5 2016-02-10 Fixes validation issue when using uppercase letters in bundle_id
3.1.4 2015-09-12 Updates dependencies
3.1.3 2015-08-15 Adds quotes around code-signing identity
3.1.2 2015-07-21 Fixes minify path
3.1.1 2015-07-21 Fixes relative config path
3.1.0 2015-07-20 Adds uglify_js option (will uglify all JS found in the app)
3.0.2 2015-07-09 Do not --force signing as it makes the app crash on some cases
3.0.1 2015-07-09 Adds the Fixing permissions step
3.0.0 2015-07-09 Adds the identity_installer option

Adds --force when signing Do not force bundle IDs when signing | | 2.1.2 | 2015-07-08 | Updates repository URL | | 2.1.1 | 2015-07-08 | NPM fix | | 2.1.0 | 2015-07-08 | Adds packaging step | | 2.0.0 | 2015-07-08 | Initial version |

License

This project is released under the MIT License.

Credits

你可能感兴趣的文章:

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-72437.html

文章标题:nwjs-macappstore-builder

回到顶部