RaveJS / rave

Zero-configuration application bootstrap and development
278 stars 8 forks source link

Set npm package location to the root of the package #33

Closed KidkArolis closed 10 years ago

KidkArolis commented 10 years ago

Fixes #24 (like #28, but with bower changes removed)

This preserves the node behaviour, where relative requires within nested main work as expected. E.g. a package with

"name": "mypkg", "main": "./lib/index"

can use files from the package root in the main file like so

require("../foo/bar")

Other packages can read files from anywhere in the package regardless of whether the main is nested, e.g.

require("mypkg/foo/bar")

unscriptable commented 10 years ago

Thanks a ton @KidkArolis!