Olivier Scherrer

Olivier is a Front End Developer at Lab49, London, a strategy, design and technology consulting firm that creates advanced solutions for the world’s leading investment banks, asset managers and exchanges. He has a strong experience in developing real-time HTML5 applications.
He's the author of Emily and Olives, two JavaScript frameworks that allow to easily create powerful web applications on top of node.js, with high UI performance and low memory footprint.
Olivier is a Front End Developer at Lab49, London, a strategy, design and technology consulting firm that creates advanced solutions for the world’s leading investment banks, asset managers and exchanges. He has a strong experience in developing real-time HTML5 applications.
He's the author of Emily and Olives, two JavaScript frameworks that allow to easily create powerful web applications on top of node.js, with high UI performance and low memory footprint.View Olivier Scherrer on LinkedIn
  • ask me anything
  • GitHub podefr
  • Emily
  • Olives
  • rss
  • archive
  • Locally test your npm modules without publishing them to npmjs.org

    There could be several situations where you want to locally deploy an npm module of your own before publishing it to npmjs.org.

    Say you’ve just created one and want to see how it deploys, or you’re fixing bugs and you want to test the module in integration before publishing a new version, or you just want to keep your npm private.

    To create a local npm, change directory to where its package.json is.

    cd /path/to/package.json
    

    Then run the pack command:

    npm pack
    

    This will create, in the same directory, a tarball named after the name of the project + the version specified in the package.json.

    This is exactly what is published to npmjs.org! You can now see what’s inside

    tar -tf packagename-version.tgz
    

    Or you can install it in your project to test it in integration.

    cd path/to/your/project/
    npm install ../path/to/your/npm/packagename-version.tgz
    

    As you can see, ‘npm install’ can either be used to fetch an npm on the official repository, or to install a local one.

    Note that each time you’ll run npm install, the previous files will be overridden by the new ones, regardless of the version number, which is pretty convenient!

    Hope this helps!

    • August 30, 2012 (2:47 am)
    • 3 notes
    • #npm
    • #node.js
    • #pack
    • #test
    1. hermanjunge likes this
    2. hermanjunge reblogged this from podefr
    3. podefr posted this
© 2012–2013 Olivier Scherrer