Skip to content
This repository

Start on OS launch #9

Open
NV opened this Issue · 1 comment

1 participant

Nikita Vasilyev
Nikita Vasilyev
Owner
NV commented

Make a postinstall npm hook for all major operating systems.

http://en.wikipedia.org/wiki/Init

Mac OS X

Create a ~/Library/LaunchAgents/com.chrome.devtools.autosave.launchd.plist file with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.chrome.devtools.autosave.launchd</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/local/bin/autosave</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
    <key>KeepAlive</key>
    <true/>
  <key>EnvironmentVariables</key>
  <dict>
    <key>PATH</key>
    <string>/usr/local/bin</string><!-- dirname $(which node) -->
  </dict>
    <key>StandardOutPath</key>
    <string>/var/log/autosave.log</string>
    <key>StandardErrorPath</key>
    <string>/var/log/autosave.error.log</string>
</dict>
</plist>

Make sure it works:

➤ launchctl load ~/Library/LaunchAgents/com.chrome.devtools.autosave.launchd.plist
➤ launchctl list | grep chrome
38609   -   com.chrome.devtools.autosave.launchd

Enjoy.

Windows

http://en.wikipedia.org/wiki/Windows_Registry#Command_line_editing

Linux

FreeBSD

rc.d

Nikita Vasilyev NV referenced this issue in NV/chrome-devtools-autosave
Closed

Changes Not Being Sent to Server on Mac OS X 10.7.3 #26

Nikita Vasilyev NV referenced this issue
Closed

Run on startup #4

Nikita Vasilyev NV referenced this issue from a commit
Nikita Vasilyev Start on OS launch #9
Works on Mac OS X
afe98fe
Nikita Vasilyev NV referenced this issue from a commit
Nikita Vasilyev Start on Mac OS X launch #9
* Kill previous autosave process when it’s running
* Convert tabs to 4 spaces
30c5e98
Nikita Vasilyev NV referenced this issue from a commit
Nikita Vasilyev Fix the path. #9 95c7ea6
Nikita Vasilyev NV referenced this issue from a commit
Nikita Vasilyev Start on Ubuntu launch #9 793fbe6
Nikita Vasilyev
Owner
NV commented

Just made it work on Ubuntu, although I haven’t tested it much since I’m not Ubuntu user. Please npm link the repo and let me know how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.