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

electron-lets-move

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-lets-move

[![npm version](https://badge.fury.io/js/electron-lets-move.svg)](https://badge.fury.io/js/electron-lets-move)

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

npm version

Electron LetsMove

A module that offers to automatically move your Electron app to the Applications folder if opened from another location. Inspired by LetsMove for MacOS.

Electron LetsMove

Requirements

This module is designed to be used within Electron on OSX.

Installation

npm install --save electron-lets-move

Usage

You should call the moveToApplications method as soon as possible after the app ready event in the main process. Ideally before the user has any chance to interact with the application.

moveToApplications returns a promise that will resolve when the application is in the correct location or an error occurred. You can also provide an optional node-style callback as the only parameter.

ES5

const {app} = require('electron');
const {moveToApplications} = require('electron-lets-move');

app.on('ready', function() {
  moveToApplications(function(err) {
    if (err) {
      // log error, something went wrong whilst moving the app.
    }

    // do the rest of your application startup
  });
});

ES6

import {app} from 'electron';
import {moveToApplications} from 'electron-lets-move';

app.on('ready', async () => {
  try {
    await moveToApplications();
    // do the rest of your application startup
  } catch (error) {
    // log error, something went wrong whilst moving the app.
  }
});

License

Electron LetsMove is released under the MIT license. It is simple and easy to understand and places almost no restrictions on what you can do with it. More Information

FAQs

Package last updated on 11 Dec 2016

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