Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Commit

Permalink
Remove dynamic require()
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrimue committed Jan 27, 2016
1 parent 56d1711 commit 62f7219
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
'use strict';
const osName = process.platform;
const autostart = require(`./lib/${osName}.js`);
const autostarts = {
darwin: require(`./lib/darwin.js`),
linux: require(`./lib/linux.js`),
win32: require(`./lib/win32.js`),
};
const autostart = autostarts[process.platform];

function enableAutostart(key, command, path, callback) {
if (arguments.length < 3) {
Expand Down

0 comments on commit 62f7219

Please sign in to comment.