WordPress.org

Make WordPress Core

Ticket #11420: wp-concat-tinymce

File wp-concat-tinymce, 1.0 KB (added by ryan, 10 years ago)

wp-concat-tinymce script

Line 
1#!/bin/sh
2
3echo '// core' > wp-tinymce.js
4cat tiny_mce.js >> wp-tinymce.js
5
6for file in `find . -name editor_template.js`
7do
8        echo "// $file" >> wp-tinymce.js
9        cat $file >> wp-tinymce.js
10        echo '' >> wp-tinymce.js
11done
12
13for file in `find . -name editor_plugin.js`
14do
15        echo "// $file" >> wp-tinymce.js
16        cat $file >> wp-tinymce.js
17        echo '' >> wp-tinymce.js
18done
19
20echo "// mark as loaded" >> wp-tinymce.js
21cat >> wp-tinymce.js <<HERE
22(function(){if('undefined'==tinyMCEPreInit)return;var b=tinyMCEPreInit,a=tinymce.ScriptLoader,f=b.mceInit.language,e=b.mceInit.theme,c=b.mceInit.plugins,d=b.suffix;a.markDone(b.base+"/langs/"+f+".js");a.markDone(b.base+"/themes/"+e+"/editor_template"+d+".js");a.markDone(b.base+"/themes/"+e+"/langs/"+f+".js");a.markDone(b.base+"/themes/"+e+"/langs/"+f+"_dlg.js");tinymce.each(c.split(","),function(g){if(g&&g.charAt(0)!="-"){a.markDone(b.base+"/plugins/"+g+"/editor_plugin"+d+".js");a.markDone(b.base+"/plugins/"+g+"/langs/"+f+".js");a.markDone(b.base+"/plugins/"+g+"/langs/"+f+"_dlg.js")}})})();
23HERE
24
25gzip wp-tinymce.js