npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

adverb-signals

v1.0.0

Published

An event system based on JS-Signals.

Downloads

5

Readme

JS-Signals

Build Status

Custom event/messaging system for JavaScript inspired by AS3-Signals.

For a more in-depth introduction read the JS-Signals Project Page and visit the links below.

Links

License

Distribution Files

You can use the same distribution file for all the evironments, browser script tag, AMD, CommonJS (since v0.7.0).

Files inside dist folder:

  • docs/index.html : Documentation.
  • signals.js : Uncompressed source code with comments.
  • signals.min.js : Compressed code.

You can install JS-Signals on Node.js using NPM

npm install signals

CompoundSignal

Note that there is an advanced Signal type called CompoundSignal that is compatible with js-signals v0.7.0+. It's useful for cases where you may need to execute an action after multiple Signals are dispatched. It was split into its' own repository since this feature isn't always needed and that way it can be easily distributed trough npm.

CompoundSignal repository

Repository Structure

Folder Structure

|-build       ->  files used on the build process
|-src         ->  source files
|-tests       ->  unit tests
`-dist        ->  distribution files
  `-docs        ->  documentation

Branches

master      ->  always contain code from the latest stable version
release-**  ->  code canditate for the next stable version (alpha/beta)
develop     ->  main development branch (nightly)
**other**   ->  features/hotfixes/experimental, probably non-stable code

Building your own

This project uses Apache Ant for the build process. If for some reason you need to build a custom version of JS-Signals install Ant and run:

ant build

This will delete all JS files inside the dist folder, merge/update/compress source files, validate generated code using JSLint and copy the output to the dist folder.

There is also another ant task that runs the build task and generate documentation (used before each deploy):

ant deploy

IMPORTANT: dist folder always contain the latest version, regular users should not need to run build task.

Running Tests

The specs work on the browser and on node.js, during development you can use the spec/runner_dev.html file to avoid doing a build every time you make changes to the source files. On node.js you need to run ant compile after each source file change otherwise npm test will execute the files from last build - not adding it as a pretest script since the build adds information about the build date and build number and that would pollute the commit history.