Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Serve npm modules #16

Open
timoxley opened this issue May 21, 2011 · 1 comment
Open

Serve npm modules #16

timoxley opened this issue May 21, 2011 · 1 comment

Comments

@timoxley
Copy link

say I want to serve an npm module (eg underscore) via stitch, is this the best way?

var stitch    = require('stitch'),
    path     = require('path')

// grab the parent directory for underscore, there doesn't appear to be a way to compile just one file?
var package = stitch.createPackage({
  paths: [path.resolve(require.resolve('underscore'), '..')],
});
// + package.compile/createServer, etc.
@raroni
Copy link
Contributor

raroni commented Apr 12, 2012

I don't think Stitch is meant to handle npm packages.

You might want to check out browser-require or my Hercules.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants