Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

app-builder-lib

Package Overview
Dependencies
Maintainers
2
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-builder-lib

electron-builder lib

  • 24.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
142K
decreased by-58.17%
Maintainers
2
Weekly downloads
 
Created

What is app-builder-lib?

The app-builder-lib npm package is a library designed to facilitate the building and packaging of applications, particularly Electron applications. It provides a range of tools and utilities to streamline the process of creating distributable versions of your app for different platforms.

What are app-builder-lib's main functionalities?

Building Electron Applications

This feature allows you to build Electron applications for multiple platforms (macOS, Windows, Linux) using a single configuration object. The code sample demonstrates how to set up a basic build configuration and initiate the build process.

const { build } = require('app-builder-lib');

build({
  config: {
    appId: 'com.example.app',
    productName: 'ExampleApp',
    directories: {
      output: 'dist',
      buildResources: 'resources'
    },
    files: ['**/*'],
    mac: {
      target: 'dmg'
    },
    win: {
      target: 'nsis'
    },
    linux: {
      target: 'AppImage'
    }
  }
}).then(() => {
  console.log('Build successful!');
}).catch(err => {
  console.error('Build failed:', err);
});

Code Signing

This feature provides the ability to sign your application code, which is essential for distribution on certain platforms like Windows. The code sample shows how to sign an application using a certificate file.

const { sign } = require('app-builder-lib');

sign({
  path: 'path/to/your/app',
  platform: 'win32',
  certificateFile: 'path/to/certificate.pfx',
  certificatePassword: 'your-password'
}).then(() => {
  console.log('Code signing successful!');
}).catch(err => {
  console.error('Code signing failed:', err);
});

Auto-Update Integration

This feature allows you to integrate auto-update functionality into your application by publishing updates to a specified provider. The code sample demonstrates how to publish updates to a GitHub repository.

const { publish } = require('app-builder-lib');

publish({
  provider: 'github',
  owner: 'your-github-username',
  repo: 'your-repo-name',
  token: 'your-github-token'
}).then(() => {
  console.log('Publishing successful!');
}).catch(err => {
  console.error('Publishing failed:', err);
});

Other packages similar to app-builder-lib

Keywords

FAQs

Package last updated on 24 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc