Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Allow defining more packages in the jam section. #105

Merged
merged 1 commit into from

2 participants

@ryanramage
Collaborator

Work for Issue #99.

This helps porting over existing projects so that you don't have to
create a jam package for all the dependencies that are already in the
source of the current project.

@ryanramage ryanramage Allow defining more packages in the jam section.
This helps porting over existing projects so that you don't have to
create a jam package for all the dependencies that are already in the
source of the current project.
86b54ae
@caolan caolan merged commit e70c29d into caolan:master
@ryanramage
Collaborator

Hey @caolan thanks for the flurry of closing PRs. Hope all is well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 26, 2012
  1. @ryanramage

    Allow defining more packages in the jam section.

    ryanramage authored
    This helps porting over existing projects so that you don't have to
    create a jam package for all the dependencies that are already in the
    source of the current project.
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/project.js
View
15 lib/project.js
@@ -183,6 +183,21 @@ exports.updateRequireConfig = function (package_dir, baseurl, callback) {
if (cfg.jam && cfg.jam.shim) {
shims[cfg.name] = cfg.jam.shim;
}
+ if (cfg.jam && cfg.jam.extra_packages) {
+ var extra_packages = Object.keys(cfg.jam.extra_packages);
+ extra_packages.forEach(function(extra_pkg){
+ var extra_val = {
+ name: extra_pkg,
+ location: dir + '/' + encodeURIComponent(pkg.dir),
+ main: cfg.jam.extra_packages[extra_pkg].main,
+ local: true
+ }
+ packages.push(extra_val);
+ if (extra_pkg.shim) {
+ shims[extra_pkg.name] = extra_pkg.name;
+ }
+ });
+ }
});
utils.getJamVersion(function (err, version) {
Something went wrong with that request. Please try again.