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

Add a --lib option to include .js files from a package lib directory. #126

Closed
wants to merge 1 commit into from

Conversation

vic
Copy link

@vic vic commented Mar 9, 2012

Most of ender users would expect that using Ender's require would work
just like node's require. Moreover many packages distributed with npm
have a lib directory and a main javascript file that just requires
code from the lib directory.

Previous to this commit, ender build only included the package's
main file, and if this main file tried to require a file from its
lib directory, doing so would fail.

This patch adds a --lib option to the build and add commands to
tell ender to include the .js files from the directory defined on
a module's package.json file.

The client-side code for allowing relative requires is implemented at
ender-js/ender-js#13

Most of ender users would expect that using Ender's require would work
just like node's require. Moreover many packages distributed with npm
have a lib directory and a main javascript file that just requires
code from the lib directory.

Previous to this commit, `ender build` only included the package's
main file, and if this main file tried to require a file from its
lib directory, doing so would fail.

This patch adds a --lib option to the `build` and `add` commands to
tell ender to include the .js files from the directory defined on
a module's package.json file.

The client-side code for allowing relative requires is implemented at

 ender-js/ender-js#13
@rvagg
Copy link
Member

rvagg commented May 9, 2012

Since we're focusing on the 1.0-wip branch I'm going to close this unfortunately. I don't mind where you're heading with this but I think it can be rolled together in #131 and #124 in a more integrated way. Feel free to open another issue or PR on this against the 1.0-wip branch but again, it might be best to discuss larger changes in an issue first so we can iron out the details before diving in.

@rvagg rvagg closed this May 9, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants