Permalink
Browse files

Upload each module separate to the wiki

Due to bug https://bugzilla.wikimedia.org/show_bug.cgi?id=29784
It's recommended to split twinkle up in multiple files

Remember to add
twinkleprod.js|twinkleimage.js|twinklebatchundelete.js|twinklewarn.js|twinklespeedy.js|friendlyshared.js
|twinklediff.js|twinkleunlink.js|twinkledelimages.js|friendlytag.js|twinkledeprod.js|friendlywelcome.js
|twinklexfd.js|twinklebatchdelete.js|twinklebatchprotect.js|twinkleconfig.js|twinklefluff.js
|twinkleprotect.js|twinklearv.js|friendlytalkback.js
to gadget-definition when deploying
  • Loading branch information...
1 parent dca826d commit ea60cc0536b72ce8a8d3524003b3d0729bf93e61 @azatoth committed May 30, 2013
View
@@ -2,7 +2,6 @@
alltwinkle.js
/.settings
/.project
-/twinkle.js
jsl.conf
stash*.txt
stash*.diff
View
@@ -1,17 +1,27 @@
-all: twinkle.js
+all:
-twinkle.min.js: twinkle.js
- uglifyjs --output $@ $^
+modules = modules/twinkleprod.js \
+ modules/twinkleimage.js \
+ modules/twinklebatchundelete.js \
+ modules/twinklewarn.js \
+ modules/twinklespeedy.js \
+ modules/friendlyshared.js \
+ modules/twinklediff.js \
+ modules/twinkleunlink.js \
+ modules/twinkledelimages.js \
+ modules/friendlytag.js \
+ modules/twinkledeprod.js \
+ modules/friendlywelcome.js \
+ modules/twinklexfd.js \
+ modules/twinklebatchdelete.js \
+ modules/twinklebatchprotect.js \
+ modules/twinkleconfig.js \
+ modules/twinklefluff.js \
+ modules/twinkleprotect.js \
+ modules/twinklearv.js \
+ modules/friendlytalkback.js
-
-twinkle.js: twinkle.header.js $(wildcard modules/*.js) twinkle.footer.js
- awk 'FNR==1{print ""}{print}' $^ > $@
-
-
-deploy: twinkle.js morebits.js morebits.css
+deploy: twinkle.js morebits.js morebits.css $(modules)
./sync.pl --deploy $^
-clean:
- rm -f twinkle.js twinkle.min.js
-
-.PHONY: deploy clean
+.PHONY: deploy all
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** friendlyshared.js: Shared IP tagging module
@@ -186,3 +189,4 @@ Twinkle.shared.callback.evaluate = function friendlysharedCallbackEvaluate(e) {
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.shared.callbacks.main);
};
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** friendlytag.js: Tag module
@@ -1334,3 +1337,4 @@ Twinkle.tag.callback.evaluate = function friendlytagCallbackEvaluate(e) {
break;
}
};
+})(jQuery);
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** friendlytalkback.js: Talkback module
@@ -345,3 +348,4 @@
};
}());
+})(jQuery);
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** friendlywelcome.js: Welcome module
@@ -716,3 +719,4 @@ Twinkle.welcome.callback.evaluate = function friendlywelcomeCallbackEvaluate(e)
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.welcome.callbacks.main);
};
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinklearv.js: ARV module
@@ -773,3 +776,4 @@ Twinkle.arv.processAN3 = function( params ) {
Morebits.wiki.removeCheckpoint(); // all page updates have been started
}
+})(jQuery);
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinklebatchdelete.js: Batch delete module (sysops only)
@@ -379,3 +382,4 @@ Twinkle.batchdelete.callbacks = {
pageobj.save(params.onsuccess);
}
};
+})(jQuery);
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinklebatchprotect.js: Batch protect module (sysops only)
@@ -417,3 +420,4 @@ Twinkle.batchprotect.callbacks = {
} );
}
};
+})(jQuery);
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinklebatchundelete.js: Batch undelete module
@@ -123,3 +126,4 @@ Twinkle.batchundelete.callbacks = {
}
}
};
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinkleconfig.js: Preferences module
@@ -1748,3 +1751,4 @@ Twinkle.config.saveSuccess = function twinkleconfigSaveSuccess(pageobj) {
noticeclear.style.clear = "both";
Morebits.status.root.appendChild(noticeclear);
};
+})(jQuery);
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinkledelimages.js: Batch deletion of images (sysops only)
@@ -221,3 +224,4 @@ Twinkle.delimages.callbacks = {
self.save();
}
};
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinkledeprod.js: Batch deletion of expired PRODs (sysops only)
@@ -155,3 +158,4 @@
});
};
}());
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinklediff.js: Diff module
@@ -80,3 +83,4 @@ Twinkle.diff.callbacks = {
window.location = mw.util.wikiScript('index') + '?' + Morebits.queryString.create( query );
}
};
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinklefluff.js: Revert/rollback module
@@ -555,3 +558,4 @@ Twinkle.fluff.init = function twinklefluffinit() {
}
}
};
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinkleimage.js: Image CSD module
@@ -339,3 +342,4 @@ Twinkle.image.callbacks = {
}
}
};
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinkleprod.js: PROD module
@@ -320,3 +323,4 @@ Twinkle.prod.callback.evaluate = function twinkleprodCallbackEvaluate(e) {
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.prod.callbacks.main);
};
+})(jQuery);
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinkleprotect.js: Protect/RPP module
@@ -1254,3 +1257,4 @@ Twinkle.protect.callbacks = {
rppPage.save();
}
};
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinklespeedy.js: CSD module
@@ -1613,3 +1616,4 @@ Twinkle.speedy.callback.evaluateUser = function twinklespeedyCallbackEvaluateUse
wikipedia_page.setCallbackParameters(params);
wikipedia_page.load(Twinkle.speedy.callbacks.user.main);
};
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinkleunlink.js: Unlink module
@@ -273,3 +276,4 @@ Twinkle.unlink.callbacks = {
}
}
};
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinklewarn.js: Warn module
@@ -1753,3 +1756,4 @@ Twinkle.warn.callback.evaluate = function twinklewarnCallbackEvaluate(e) {
wikipedia_page.setFollowRedirect( true );
wikipedia_page.load( Twinkle.warn.callbacks.main );
};
+})(jQuery);
View
@@ -1,3 +1,6 @@
+(function($){
+
+
/*
****************************************
*** twinklexfd.js: XFD module
@@ -1695,3 +1698,4 @@ Twinkle.xfd.callback.evaluate = function(e) {
break;
}
};
+})(jQuery);
View
22 sync.pl
@@ -41,7 +41,27 @@
my %deploys = (
'twinkle.js' => 'MediaWiki:Gadget-Twinkle.js',
'morebits.js' => 'MediaWiki:Gadget-morebits.js',
- 'morebits.css' => 'MediaWiki:Gadget-morebits.css'
+ 'morebits.css' => 'MediaWiki:Gadget-morebits.css',
+ 'modules/twinkleprod.js' => 'MediaWiki:Gadget-twinkleprod.js',
+ 'modules/twinkleimage.js' => 'MediaWiki:Gadget-twinkleimage.js',
+ 'modules/twinklebatchundelete.js' => 'MediaWiki:Gadget-twinklebatchundelete.js',
+ 'modules/twinklewarn.js' => 'MediaWiki:Gadget-twinklewarn.js',
+ 'modules/twinklespeedy.js' => 'MediaWiki:Gadget-twinklespeedy.js',
+ 'modules/friendlyshared.js' => 'MediaWiki:Gadget-friendlyshared.js',
+ 'modules/twinklediff.js' => 'MediaWiki:Gadget-twinklediff.js',
+ 'modules/twinkleunlink.js' => 'MediaWiki:Gadget-twinkleunlink.js',
+ 'modules/twinkledelimages.js' => 'MediaWiki:Gadget-twinkledelimages.js',
+ 'modules/friendlytag.js' => 'MediaWiki:Gadget-friendlytag.js',
+ 'modules/twinkledeprod.js' => 'MediaWiki:Gadget-twinkledeprod.js',
+ 'modules/friendlywelcome.js' => 'MediaWiki:Gadget-friendlywelcome.js',
+ 'modules/twinklexfd.js' => 'MediaWiki:Gadget-twinklexfd.js',
+ 'modules/twinklebatchdelete.js' => 'MediaWiki:Gadget-twinklebatchdelete.js',
+ 'modules/twinklebatchprotect.js' => 'MediaWiki:Gadget-twinklebatchprotect.js',
+ 'modules/twinkleconfig.js' => 'MediaWiki:Gadget-twinkleconfig.js',
+ 'modules/twinklefluff.js' => 'MediaWiki:Gadget-twinklefluff.js',
+ 'modules/twinkleprotect.js' => 'MediaWiki:Gadget-twinkleprotect.js',
+ 'modules/twinklearv.js' => 'MediaWiki:Gadget-twinklearv.js',
+ 'modules/friendlytalkback.js' => 'MediaWiki:Gadget-friendlytalkback.js'
);
# Config file should be an hash consisting of username and password keys
Oops, something went wrong.

0 comments on commit ea60cc0

Please sign in to comment.