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 🙏

© 2026 – Pkg Stats / Ryan Hefner

amdee

v0.5.5

Published

Converting CommonJS modules into AMD format

Readme

Amdee

Overview

Amdee is a command-line tool for converting Node style packages into client-side scripts that cooperates with (requireJS)[http://www.requirejs.org].

The difference between Amdee and other systems like Browserify is that Amdee does not compile everything into a single script; it compiles only the files within the current node module into a single script, and expects requireJS to serve the external modules.

Amdee also provides many (but not all) core modules from Node for the client-side as well.

Amdee will convert a script, along with its relative dependencies within a package, into a single javascript file. All of the relative dependencies will be resolved to pure javascript variable, i.e.,

// main
var Foo = require('./foo');

will be compiled into something equivalent to the following

// foo_module

var foo_module = (function () { /* foo module definition */ })();

// main_module
var main_module = (function() {
  var Foo = foo_module; // require is parsed out from above
}); 

External modules will be left along and loaded as separate scripts via AMD mechanism. For exmaple:

// require jQuery
var $ = require('jquery'); // this is an external module.

Will be compiled as following

define(['jquery'], function(require, exports, module) {

    var $ = require('jquery');
}

And then you can setup the shim for requireJS as following:

require.config({
    "path": {
        "jquery": "http://..."
    }, 
    "shim": {
        "jquery": {
            "deps": [],
            "exports": "jQuery"
        }
    }
}); 

The config object for requireJS can be passed into the requirejs attribute of the amdee.run function, which is further described below.

Installation

$ npm install -g amdee

Usage

On Command line:

$ amdee --source <module_file> --target <output_file>

In Node program (below is written in coffee-script with expressjs)

express = require 'express'
amdee = require 'amdee'
app = express()

app.configure ->
  # ...
  amdee.run
    source: './client/main.coffee'
    target: './public/js/main.js'
    watch: true
    requirejs: # add requireJS's config here; will be written to main.js
      paths:
        jquery: 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min'
        'jquery.livequery': 'https://raw.github.com/brandonaaron/livequery/master/jquery.livequery'
        'jquery.address': 'https://raw.github.com/bzlib/jquery-address/master/src/jquery.address'
      shim:
        jquery:
          deps: []
          exports: 'jQuery'
        'jquery.livequery': ['jquery']
        'jquery.address': ['jquery']

The watch: true setting will ensure that if main.coffee & its relative dependencies are changed, main.js will be recompiled.

Ensure your main.coffee to include the needed dependencies the usual way.

$ = require 'jquery'
require 'jquery.address' # plugin does not return object
require 'jquery.livequery'

# add relative dependencies within the module

# ... your code ...

Any relative dependencies will be resolved into the same file, whereas the external dependencies will be loaded as separate scripts.

License

Amdee is released under MIT License.

Node Core Modules

  • Buffer - not available in browser
  • child_process - not available
  • cluster - not available in browser
  • crypto - not available
  • dns - not available
  • domain - not available
  • EventEmitter - available
  • fs - not available
  • globals
    • process - might not make sense
    • console - certainly needed
    • require - yes definitely needed
    • __filename
    • __dirname
    • module
    • exports
    • setTimeout
    • clearTimeout
    • setInterval
    • clearInterval
  • http - not sure if make sense, but partial request & response do
  • https - same thing
  • net - same thing
  • os - might not make sense either.
  • path - some of the capabilities make sense; but not sure all of it...
  • process - not sure...
  • punycode - don't even know what this does...
  • querstring - available
  • readline - not available
  • console - yes
  • stream - not available
  • string_decoder - not available
  • ssl - not available
  • udp - not available
  • url - yes
  • util - yes
  • vm - not avialable
  • zlib - not available