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

atom-package-reloader

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atom-package-reloader

a reloader for atom packages

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

atom-package-reloader

reloades your atom packages on file change

atom-package-reloader

Install

npm install --save-dev atom-package-reloader

Usage

returns a Function({pkg,folders}) if atom.inDevMode()

optionsTypeUsage
pkgstringname of your package
foldersarray(optional) names of folders to watch defaults to '["lib"]'

returns a object with three functions

functionUsage
reload()manually reloads your package
watchOnce()renews folder watchers
dispose()manually dispose folder watchers

watchOnce will be called automatically. One file change reload() and dispose() will be called.

if not atom.inDevMode() null will be returned

Example

Will only work in dev mode!

# inside of your activation function
# delay is necessary to eliminate double execution
# try-catch is only necessary if you use it as a dev-dependecy
setTimeout (->
  reloaderSettings = pkg:"name-of-your-package",folders:["lib","styles"]
  try
    reloader ?= require("atom-package-reloader")(reloaderSettings)
  catch

  ),500

# inside of your deactivation function
reloader?.dispose()
reloader = null

Release History

  • v0.0.1: First release

License

Copyright (c) 2015 Paul Pflugradt Licensed under the MIT license.

Keywords

FAQs

Package last updated on 16 Jun 2015

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