Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including devsync with all npm packages installed. Try it out:

var devsync = require("devsync")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

devsync v0.3.0

Syncing npm modules while development

Devsync

Sync your own npm library directly into the package which depends on it. If you're a publisher of libraries on npm, yes, devsync has been made for you!

concept

Use case

Devsync might be useful in such a case:

  • You have a main application your-app
  • your-app has a dependency to your-library
  • Adds features, or fixes bug on your-library
  • Needs to update your-library in your-app locally, without git push or npm publish

Installation

$ npm install -g cognitom/devsync

After some updates and reviews, we'll publish to npm, soon. Then,

$ npm install -g devsync

Usage

Go to your-library directory and run devsync:

$ cd ~/Git/your-library
$ devsync

The example above assumes that you have a directory structure like this:

  • ~/Git/your-app: Your main application
  • ~/Git/your-library: Your library internally used in your-app

If you're working on the project at Desktop, you could devsync like this:

$ cd ~/Git/your-library
$ devsync -t ~/Desktop/your-temporary-project

To watch and automatically devsync, -w flag would be useful:

$ cd ~/Git/your-library
$ devsync -w

CLI options

--target / -t

--cwd / -c

--watch / -w

JavaScript API

const
  devsync = require('devsync')

devsync({
  cwd: 'path/to/your-library',
  target: 'path/to/your-app'
})
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free