|
@@ -896,22 +896,21 @@ selector: "commit:",
|
|
|
category: 'committing',
|
|
|
fn: function (aPackage){
|
|
|
var self=this;
|
|
|
-function $Exporter(){return smalltalk.Exporter||(typeof Exporter=="undefined"?nil:Exporter)}
|
|
|
-function $StrippedExporter(){return smalltalk.StrippedExporter||(typeof StrippedExporter=="undefined"?nil:StrippedExporter)}
|
|
|
-function $ChunkExporter(){return smalltalk.ChunkExporter||(typeof ChunkExporter=="undefined"?nil:ChunkExporter)}
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
-_st([_st($Exporter()).__minus_gt(_st(_st(_st(_st(aPackage)._commitPathJs()).__comma("/")).__comma(_st(aPackage)._name())).__comma(".js")),_st($StrippedExporter()).__minus_gt(_st(_st(_st(_st(aPackage)._commitPathJs()).__comma("/")).__comma(_st(aPackage)._name())).__comma(".deploy.js")),_st($ChunkExporter()).__minus_gt(_st(_st(_st(_st(aPackage)._commitPathSt()).__comma("/")).__comma(_st(aPackage)._name())).__comma(".st"))])._do_displayingProgress_((function(commitStrategy){
|
|
|
-var fileContents;
|
|
|
+_st(self._commitChannels())._do_displayingProgress_((function(commitStrategyFactory){
|
|
|
+var fileContents,commitStrategy;
|
|
|
return smalltalk.withContext(function($ctx2) {
|
|
|
-fileContents=_st(_st(_st(commitStrategy)._key())._new())._exportPackage_(_st(aPackage)._name());
|
|
|
+commitStrategy=_st(commitStrategyFactory)._value_(aPackage);
|
|
|
+commitStrategy;
|
|
|
+fileContents=_st(_st(commitStrategy)._key())._exportPackage_(_st(aPackage)._name());
|
|
|
fileContents;
|
|
|
return self._ajaxPutAt_data_(_st(commitStrategy)._value(),fileContents);
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({commitStrategy:commitStrategy,fileContents:fileContents},$ctx1)})}),"Committing package ".__comma(_st(aPackage)._name()));
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({commitStrategyFactory:commitStrategyFactory,fileContents:fileContents,commitStrategy:commitStrategy},$ctx1)})}),"Committing package ".__comma(_st(aPackage)._name()));
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"commit:",{aPackage:aPackage},smalltalk.PackageHandler)})},
|
|
|
args: ["aPackage"],
|
|
|
-source: "commit: aPackage\x0a\x09{ \x0a\x09\x09Exporter -> (aPackage commitPathJs, '/', aPackage name, '.js').\x0a\x09\x09StrippedExporter -> (aPackage commitPathJs, '/', aPackage name, '.deploy.js').\x0a\x09\x09ChunkExporter -> (aPackage commitPathSt, '/', aPackage name, '.st')\x0a\x09} \x0a\x09\x09do: [ :commitStrategy|| fileContents |\x0a\x09\x09\x09fileContents := (commitStrategy key new exportPackage: aPackage name).\x0a\x09\x09\x09self ajaxPutAt: commitStrategy value data: fileContents ]\x0a\x09\x09displayingProgress: 'Committing package ', aPackage name",
|
|
|
-messageSends: ["do:displayingProgress:", "exportPackage:", "name", "new", "key", "ajaxPutAt:data:", "value", ",", "->", "commitPathJs", "commitPathSt"],
|
|
|
-referencedClasses: ["Exporter", "StrippedExporter", "ChunkExporter"]
|
|
|
+source: "commit: aPackage\x0a\x09self commitChannels\x0a\x09\x09do: [ :commitStrategyFactory || fileContents commitStrategy |\x0a\x09\x09\x09commitStrategy := commitStrategyFactory value: aPackage.\x0a\x09\x09\x09fileContents := (commitStrategy key exportPackage: aPackage name).\x0a\x09\x09\x09self ajaxPutAt: commitStrategy value data: fileContents ]\x0a\x09\x09displayingProgress: 'Committing package ', aPackage name",
|
|
|
+messageSends: ["do:displayingProgress:", "value:", "exportPackage:", "name", "key", "ajaxPutAt:data:", "value", ",", "commitChannels"],
|
|
|
+referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.PackageHandler);
|
|
|
|
|
@@ -940,25 +939,30 @@ smalltalk.addClass('LegacyPackageHandler', smalltalk.PackageHandler, [], 'Import
|
|
|
smalltalk.LegacyPackageHandler.comment="I am responsible for handling package loading and committing.\x0a\x0aI should not be used directly. Instead, use the corresponding `Package` methods.";
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
-selector: "commit:",
|
|
|
+selector: "commitChannels",
|
|
|
category: 'committing',
|
|
|
-fn: function (aPackage){
|
|
|
+fn: function (){
|
|
|
var self=this;
|
|
|
function $Exporter(){return smalltalk.Exporter||(typeof Exporter=="undefined"?nil:Exporter)}
|
|
|
function $StrippedExporter(){return smalltalk.StrippedExporter||(typeof StrippedExporter=="undefined"?nil:StrippedExporter)}
|
|
|
function $ChunkExporter(){return smalltalk.ChunkExporter||(typeof ChunkExporter=="undefined"?nil:ChunkExporter)}
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
-_st([_st($Exporter()).__minus_gt(_st(_st(_st(_st(aPackage)._commitPathJs()).__comma("/")).__comma(_st(aPackage)._name())).__comma(".js")),_st($StrippedExporter()).__minus_gt(_st(_st(_st(_st(aPackage)._commitPathJs()).__comma("/")).__comma(_st(aPackage)._name())).__comma(".deploy.js")),_st($ChunkExporter()).__minus_gt(_st(_st(_st(_st(aPackage)._commitPathSt()).__comma("/")).__comma(_st(aPackage)._name())).__comma(".st"))])._do_displayingProgress_((function(commitStrategy){
|
|
|
-var fileContents;
|
|
|
+var $1;
|
|
|
+$1=[(function(pkg){
|
|
|
return smalltalk.withContext(function($ctx2) {
|
|
|
-fileContents=_st(_st(_st(commitStrategy)._key())._new())._exportPackage_(_st(aPackage)._name());
|
|
|
-fileContents;
|
|
|
-return self._ajaxPutAt_data_(_st(commitStrategy)._value(),fileContents);
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({commitStrategy:commitStrategy,fileContents:fileContents},$ctx1)})}),"Committing package ".__comma(_st(aPackage)._name()));
|
|
|
-return self}, function($ctx1) {$ctx1.fill(self,"commit:",{aPackage:aPackage},smalltalk.LegacyPackageHandler)})},
|
|
|
-args: ["aPackage"],
|
|
|
-source: "commit: aPackage\x0a\x09{ \x0a\x09\x09Exporter -> (aPackage commitPathJs, '/', aPackage name, '.js').\x0a\x09\x09StrippedExporter -> (aPackage commitPathJs, '/', aPackage name, '.deploy.js').\x0a\x09\x09ChunkExporter -> (aPackage commitPathSt, '/', aPackage name, '.st')\x0a\x09} \x0a\x09\x09do: [ :commitStrategy|| fileContents |\x0a\x09\x09\x09fileContents := (commitStrategy key new exportPackage: aPackage name).\x0a\x09\x09\x09self ajaxPutAt: commitStrategy value data: fileContents ]\x0a\x09\x09displayingProgress: 'Committing package ', aPackage name",
|
|
|
-messageSends: ["do:displayingProgress:", "exportPackage:", "name", "new", "key", "ajaxPutAt:data:", "value", ",", "->", "commitPathJs", "commitPathSt"],
|
|
|
+return _st(_st($Exporter())._new()).__minus_gt(_st(_st(_st(_st(pkg)._commitPathJs()).__comma("/")).__comma(_st(pkg)._name())).__comma(".js"));
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({pkg:pkg},$ctx1)})}),(function(pkg){
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return _st(_st($StrippedExporter())._new()).__minus_gt(_st(_st(_st(_st(pkg)._commitPathJs()).__comma("/")).__comma(_st(pkg)._name())).__comma(".deploy.js"));
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({pkg:pkg},$ctx1)})}),(function(pkg){
|
|
|
+return smalltalk.withContext(function($ctx2) {
|
|
|
+return _st(_st($ChunkExporter())._new()).__minus_gt(_st(_st(_st(_st(pkg)._commitPathSt()).__comma("/")).__comma(_st(pkg)._name())).__comma(".st"));
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({pkg:pkg},$ctx1)})})];
|
|
|
+return $1;
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"commitChannels",{},smalltalk.LegacyPackageHandler)})},
|
|
|
+args: [],
|
|
|
+source: "commitChannels\x0a\x09^{ \x0a\x09\x09[ :pkg | Exporter new -> (pkg commitPathJs, '/', pkg name, '.js') ].\x0a\x09\x09[ :pkg | StrippedExporter new -> (pkg commitPathJs, '/', pkg name, '.deploy.js') ].\x0a\x09\x09[ :pkg | ChunkExporter new -> (pkg commitPathSt, '/', pkg name, '.st') ]\x0a\x09}",
|
|
|
+messageSends: ["->", ",", "name", "commitPathJs", "new", "commitPathSt"],
|
|
|
referencedClasses: ["Exporter", "StrippedExporter", "ChunkExporter"]
|
|
|
}),
|
|
|
smalltalk.LegacyPackageHandler);
|