Closed richardhundt closed 11 years ago
Hi Richard,
I just don’t get your point.
Why don’t you just
npm install uritemplate
(or add uritemplate to your package.json as dependency or devDependency)
and then
var UriTemplate = require(‘uritemplate’)
I have no problem adding an index.js.
Where should it point to? To the concatted version or the minified version?
Which build system are you using? Jake? Grunt?
Are you using the npm version or a git clone?
Franz
Von: Richard Hundt [mailto:notifications@github.com] Gesendet: Freitag, 30. August 2013 11:30 An: fxa/uritemplate-js Betreff: [uritemplate-js] Consider adding index.js (#13)
Hi, with hem I currently I need to
require("uritemplate/bin/uritemplate")
whereas adding
module.exports = require("./bin/uritemplate")
to an ./index.js file in the package root and the updating the "main" key in package.json to reference ./index.js fixes this with some build systems which depend on this convention.
— Reply to this email directly or view it on GitHub https://github.com/fxa/uritemplate-js/issues/13 . https://github.com/notifications/beacon/z007K-oJ-ZnzAnsfdzRoGfgtueOMfS-1CpbQ7f9INQiGbZSJxP4TAqt28RjEiBBq.gif
My point is that after doing an npm install, require("uritemplate") fails. It can't be found. However a require("uritemplate/bin/uritemplate") does work. I'm using hem which is related to spine.js. It a node based server and commonjs/requirejs enabled compiler. It could be a hem issue though. Not sure. However I can make it work by making the changes I suggested.
Franz X Antesberger notifications@github.com wrote:
Hi Richard,
I just don’t get your point.
Why don’t you just
npm install uritemplate
(or add uritemplate to your package.json as dependency or devDependency)
and then
var UriTemplate = require(‘uritemplate’)
I have no problem adding an index.js.
Where should it point to? To the concatted version or the minified version?
Which build system are you using? Jake? Grunt?
Are you using the npm version or a git clone?
Franz
Von: Richard Hundt [mailto:notifications@github.com] Gesendet: Freitag, 30. August 2013 11:30 An: fxa/uritemplate-js Betreff: [uritemplate-js] Consider adding index.js (#13)
Hi, with hem I currently I need to
require("uritemplate/bin/uritemplate")
whereas adding
module.exports = require("./bin/uritemplate")
to an ./index.js file in the package root and the updating the "main" key in package.json to reference ./index.js fixes this with some build systems which depend on this convention.
— Reply to this email directly or view it on GitHub https://github.com/fxa/uritemplate-js/issues/13 . https://github.com/notifications/beacon/z007K-oJ-ZnzAnsfdzRoGfgtueOMfS-1CpbQ7f9INQiGbZSJxP4TAqt28RjEiBBq.gif
— Reply to this email directly or view it on GitHub.
closing because this really is a hem thing. sorry for the noise
Hi, with hem I currently I need to
whereas adding an
./index.js
file in the package root with:and then updating the "main" key in
package.json
to reference./index.js
fixes this with some build systems which depend on this convention.