timboudreau / nb-nodejs

NodeJS support for NetBeans, originally hosted on netbeans.org
MIT License
91 stars 12 forks source link

value of "main" property in package.json should allway contain relative path #10

Closed yohny closed 10 years ago

yohny commented 11 years ago

when fresh project is created path in "main" is relative, but when you change it later through project properties window to some other file it is not relative path anymore, just directly name of the file, which is incorrect (see https://npmjs.org/doc/json.html#main)

timboudreau commented 10 years ago

It already works the way you are suggesting. What the IDE shows in the project properties dialog is a full path, because it resolves the file. But what is stored in package.json is exactly what the spec for it suggests - a relative path prefixed with ./

yohny commented 10 years ago

well I'm running Netbeans 7.4 on Ubuntu and when I create fresh Hello World project the initial value in package.json is indeed "main": "./Hello World.js", but then when I create new file, let's say newFile.js and set it as Main File using project properties file browser the package.json contains "main" : "newFile.js" - no relative path there

timboudreau commented 10 years ago

Sorry, I did find a place where the ./ could be removed, and I fixed it in 3.15.