-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All CommonJS and AMD modules to be transpiled
This enables AMD and CommonJS modules to also be transpiled (run through Babel). Still a little bit of a WIP. Closes #1276
- Loading branch information
Showing
21 changed files
with
382 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// This extension allows you to define metadata that should appear on | ||
// Any subdependencies. For example we can add the { foo: true } bool | ||
// to a module's metadata, and it will be forwarded to any subdependency. | ||
addStealExtension(function forwardMetadata(loader){ | ||
loader._forwardedMetadata = {}; | ||
loader.setForwardedMetadata = function(prop) { | ||
loader._forwardedMetadata[prop] = true; | ||
}; | ||
|
||
loader.forwardMetadata = function(load, parentName) { | ||
if(parentName) { | ||
var parentLoad = this.getModuleLoad(parentName); | ||
|
||
if(parentLoad) { | ||
// TODO use Object.assign instead? | ||
for(var p in this._forwardedMetadata) { | ||
if(p in parentLoad.metadata) { | ||
load.metadata[p] = parentLoad.metadata[p]; | ||
} | ||
} | ||
} | ||
} | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.