From f269111ff942df2466d24d8c22d215493e5dc35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Rittm=C3=BCller?= Date: Tue, 7 Nov 2017 19:41:24 +0100 Subject: [PATCH] Update compositor.json --- compositor.json | 90 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 compositor.json diff --git a/compositor.json b/compositor.json new file mode 100644 index 0000000..9bec928 --- /dev/null +++ b/compositor.json @@ -0,0 +1,90 @@ +{ + "name": "maxrimue/node-autostart", + "version": "0.1.4", + "libraries": { + "xv": "^1.1.25" + }, + "title": "", + "branch": "", + "style": { + "name": "Material", + "componentSet": { + "nav": "nav/DarkAbsoluteNav", + "header": "header/GradientHeader", + "article": "article/BasicArticle", + "footer": "footer/BasicFooter" + }, + "fontFamily": "Roboto, sans-serif", + "heading": { + "fontWeight": 500, + "letterSpacing": "-0.01em" + }, + "colors": { + "text": "#212121", + "background": "#fff", + "primary": "#2196f3", + "secondary": "#1565c0", + "highlight": "#ff4081", + "border": "#e0e0e0", + "muted": "#f5f5f5" + }, + "layout": { + "centered": true, + "bannerHeight": "80vh", + "maxWidth": 896 + } + }, + "content": [ + { + "component": "nav", + "links": [ + { + "href": "https://github.com/maxrimue/node-autostart", + "text": "GitHub" + }, + { + "href": "https://npmjs.com/package/node-autostart", + "text": "npm" + } + ] + }, + { + "component": "header", + "heading": "node-autostart", + "subhead": "manage autostart items in CLI and with an API", + "children": [ + { + "component": "ui/TweetButton", + "text": "node-autostart: manage autostart items in CLI and with an API", + "url": "" + }, + { + "component": "ui/GithubButton", + "user": "maxrimue", + "repo": "node-autostart" + } + ], + "text": "v3.0.3" + }, + { + "component": "article", + "metadata": { + "source": "github.readme" + }, + "html": "\n

\n\n\n \n

\n

node-autostart is a Node.js module that enables your module to activate autostart easily. You can also use it as a global module to set-up autostart for anything and anywhere via the command line interface (CLI). Currently, it supports:

\n\n

Install:

\n
npm install -g node-autostart

for use in CLI, and:

\n
npm install --save node-autostart

as a dependency for your module.

\n

Documentation

\n

You can use node-autostart both programmatically and per CLI. 'Enabling autostart' means to make the OS run a certain command at logon of the user who 'enabled the autostart' via a program. The command could be, for example, npm start in a certain directory, or whatever floats your boat. Here's an example for use via the CLI:

\n
  autostart enable -n "MyAwesomeApp" -p "/home/me/MyAwesomeApp" -c "npm start"

to enable,

\n
  autostart check -n "MyAwesomeApp"

to see if it is enabled, and:

\n
  autostart disable -n "MyAwesomeApp"

to disable it.\nTo use it inside your Node.js app, look at the API for Programmatic Use, if you want to use it in the CLI, use autostart -h for further information.

\n

API for Programmatic Use

\n

First, require this module inside your app like this:

\n
var autostart = require('node-autostart')

Now, you can simply enable autostart and disable it, and you can also check if it is enabled:

\n
autostart.enableAutostart(key, command, path, function (err) {\n  if(err) console.error(err);\n})\n\nautostart.disableAutostart(key, function (err) {\n  if(err) console.error(err);\n})\n\nautostart.isAutostartEnabled(key, function (err, isEnabled) {\n  if(err) console.error(err);\n\n  if(isEnabled) {\n    console.log('Autostart is enabled');\n  }\n  else {\n    console.log('Autostart is not enabled');\n  }\n\n})

If you wish, you can also use Promises instead of Callbacks:

\n
autostart.enableAutostart(key, command, path).then(() => {\n  // Success!\n}).catch((err) => {\n  console.error(err);\n  // Something bad happened\n});\n\nautostart.disableAutostart(key).then(() => {\n  // Success!\n}).catch((err) => {\n  console.error(err);\n  // Something bad happened\n});\n\nautostart.isAutostartEnabled(key).then((isEnabled) => {\n  console.log('Autostart is ' + isEnabled ? 'enabled' : 'not enabled');\n  // Success!\n}).catch((err) => {\n  console.error(err);\n  // Something bad happened\n});

Variables

\n

key: Unique identifier for startup items (always required! (Make it unique))

\n

command: Command to be executed in the specified path

\n

path: Place in which the command will be executed (Use process.cwd() if you just want it to happen in your current working directory)

\n

Functions

\n

.enableAutostart\nRequires key, command and path, returns err.

\n

.disableAutostart\nRequires key, returns err.

\n

.isAutostartEnabled\nRequires key, returns err and isEnabled.

\n

License

\n

The MIT License (MIT)

\n

Copyright (c) 2015 Max Rittmüller

\n

Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:

\n

The above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.

\n

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.

\n" + }, + { + "component": "footer", + "links": [ + { + "href": "https://github.com/maxrimue/node-autostart", + "text": "GitHub" + }, + { + "href": "https://github.com/maxrimue", + "text": "maxrimue" + } + ] + } + ] +} \ No newline at end of file