phantom gs
DESCRIPTION
phantom jsTRANSCRIPT
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 1/13
var uglify = require('./tools/BuildTools').uglify;var less = require('./tools/BuildTools').less;var jshint = require('./tools/BuildTools').jshint;var zip = require('./tools/BuildTools').zip;var copile!d = require('./tools/BuildTools').copile!d;var parse"ess#ocs = require('./tools/BuildTools').parse"ess#ocs;
var get$elease#etails = require('./tools/BuildTools').get$elease#etails;var instruent%ile = require('./tools/BuildTools').instruent%ile;var glo& = require(glo&);var path = require(path);var fs = require(fs);var eslint = require('./tools/BuildTools').eslint;var nuget = require('./tools/BuildTools').nuget;var phantojs = require('./tools/BuildTools').phantojs;var saucela&s = require('./tools/saucela&s').saucela&s;
desc(#efault &uild tas);tas(default *inify less+ function () ,-);
desc(inify all 0 files);tas(inify *
inify1coreinify1jquery1coreinify1jquery1plugininify1theesinify1plugins
+ function () ,-);
desc(inify core);tas(inify1core *+ function (paras) ,
var details = get$elease#etails(changelog.t2t);var noui = paras 33 paras.inde24f('noui') 5== 16;var coverage = paras 33 paras.inde24f('coverage') 5== 16;
var fro = *do/#o7uery.js8ditoranager.js"egacy9nput.jsutil/:$.jsutil/04<$equest.jsutil/04<.jsutil/"ocal0torage.js>opat.js
+;
if (5noui) ,fro.push(ui/?.js);
-
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 2/13
var settings = ,fro@ froversion@ details.versionrelease#ate@ details.release#ate&ase#ir@ js/tinyce/classesroot<0@ tinyce
output0ource@ js/tinyce/tinyce.jsoutputinified@ js/tinyce/tinyce.in.jsoutput#ev@ js/tinyce/tinyce.dev.jsver&ose@ falsee2pose@ pu&liccopress@ trueforce@ noui
-;
if (coverage) ,settings.outputinified = false;settings.output>overage = js/tinyce/tinyce.in.js;settings.coverage9d = paras.su&str(paras.inde24f('@') A 6 paras.length);
-
copile!d(settings);-);
desc(inify jquery1core);tas(inify1jquery1core *+ function (paras) ,
var details = get$elease#etails(changelog.t2t);var noui = paras 33 paras.inde24f('noui') 5== 16;
var fro = *8ditoranager.js"egacy9nput.jsutil/:$.jsutil/04<$equest.jsutil/04<.jsutil/"ocal0torage.js>opat.js
+;
if (5noui) ,fro.push(ui/?.js);
-
copile!d(,fro@ froodule4verrides@ ,
tinyce/do/0izzle@ js/tinyce/classes/do/0izzle.j7uery.js-version@ details.version
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 3/13
release#ate@ details.release#ate&ase#ir@ js/tinyce/classesroot<0@ tinyceoutput0ource@ js/tinyce/tinyce.jquery.jsoutputinified@ js/tinyce/tinyce.jquery.in.jsoutput#ev@ js/tinyce/tinyce.jquery.dev.js
ver&ose@ falsee2pose@ pu&liccopress@ trueforce@ noui
-);-);
desc(inify jquery plugin);tas(inify1jquery1plugin *+ function () ,
uglify(,fro@ js/tinyce/classes/jquery.tinyce.js to@ js/tinyce/jquery.tinyce.in.js-);-);
desc(inify plugin 0 files);tas(inify1plugins *inify1pasteplugin inify1ta&leplugin inify1spellchecerplugin+function () ,
glo&.sync(js/tinyce/plugins/?/plugin.js).for8ach(function(fileath) ,uglify(,fro@ fileath to@ path.join(path.dirnae(fileath) plugin.in.js)-);
-);-);
desc(inify thee 0 files);tas(inify1thees *+ function () ,
glo&.sync(js/tinyce/thees/??/thee.js).for8ach(function(fileath) ,uglify(,fro@ fileath to@ path.join(path.dirnae(fileath) thee.in.js)-);
-);-);
tas(inify1pasteplugin *+ function() ,copile!d(,
fro@ lugin.js&ase#ir@ js/tinyce/plugins/paste/classesroot<0@ tinyce.pastepluginoutput0ource@ js/tinyce/plugins/paste/plugin.jsoutputinified@ js/tinyce/plugins/paste/plugin.in.jsoutput#ev@ js/tinyce/plugins/paste/plugin.dev.jsver&ose@ falsee2pose@ pu&liccopress@ true
-);-);
tas(inify1ta&leplugin *+ function() ,copile!d(,
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 4/13
fro@ lugin.js&ase#ir@ js/tinyce/plugins/ta&le/classesroot<0@ tinyce.ta&lepluginoutput0ource@ js/tinyce/plugins/ta&le/plugin.jsoutputinified@ js/tinyce/plugins/ta&le/plugin.in.jsoutput#ev@ js/tinyce/plugins/ta&le/plugin.dev.js
ver&ose@ falsee2pose@ pu&liccopress@ true
-);-);
tas(inify1spellchecerplugin *+ function() ,copile!d(,
fro@ lugin.js&ase#ir@ js/tinyce/plugins/spellchecer/classesroot<0@ tinyce.spellchecerpluginoutput0ource@ js/tinyce/plugins/spellchecer/plugin.jsoutputinified@ js/tinyce/plugins/spellchecer/plugin.in.jsoutput#ev@ js/tinyce/plugins/spellchecer/plugin.dev.jsver&ose@ falsee2pose@ pu&liccopress@ true
-);-);
desc(Bundles in plugins/thees into a tinyce.full.in.js file);tas(&undle *inify+ function(paras) ,
var input%iles in>ontent addlugins = true;
function append!ddon(nae) ,if (addlugins) ,
if (nae == '?') ,glo&.sync('js/tinyce/plugins/?/plugin.in.js').for8ach(function(fileath)
,in>ontent A= Cn; A fs.read%ile0ync(fileath).to0tring();
-);- else ,
in>ontent A= Cn; A fs.read%ile0ync(js/tinyce/plugins/ A nae A/plugin.in.js).to0tring();
-- else ,
if (nae == '?') ,glo&.sync('js/tinyce/thees/?/thee.in.js').for8ach(function(fileath)
,in>ontent A= Cn; A fs.read%ile0ync(fileath).to0tring();
-);- else ,
in>ontent A= Cn; A fs.read%ile0ync(js/tinyce/thees/ A nae A
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 5/13
/thee.in.js).to0tring();-
--
in>ontent = fs.read%ile0ync(js/tinyce/tinyce.in.js).to0tring();
if (arguents*D+ == '?') ,arguents = *'thees@?' 'plugins@?'+;
-
for (var i = D; i E arguents.length; iAA) ,var args = arguents*i+.split('@');
if (args*D+ == 'plugins') ,addlugins = true;
- else if (args*D+ == 'thees') ,addlugins = false;
-
append!ddon(args*6+ args*D+);-
fs.Frite%ile0ync(js/tinyce/tinyce.full.in.js in>ontent);-);
desc(Bundles in plugins/thees Fithout inifying into a tinyce.full.js file);tas(&undle1full *default+ function (paras) ,
var input%iles full>ontent addlugins = true;
function append!ddon(nae) ,if (addlugins) ,
if (nae == '?') ,glo&.sync('js/tinyce/plugins/?/plugin.js').for8ach(function (fileath) ,
full>ontent A= Cn; A fs.read%ile0ync(fileath).to0tring();-);
- else ,full>ontent A= Cn; A fs.read%ile0ync(js/tinyce/plugins/ A nae A
/plugin.js).to0tring();-
- else ,if (nae == '?') ,
glo&.sync('js/tinyce/thees/?/thee.in.js').for8ach(function (fileath),
full>ontent A= Cn; A fs.read%ile0ync(fileath).to0tring();-);
- else ,full>ontent A= Cn; A fs.read%ile0ync(js/tinyce/thees/ A nae A
/thee.js).to0tring();
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 6/13
--
-
full>ontent = fs.read%ile0ync(js/tinyce/tinyce.js).to0tring();
if (arguents*D+ == '?') ,arguents = *'thees@?' 'plugins@?'+;-
for (var i = D; i E arguents.length; iAA) ,var args = arguents*i+.split('@');
if (args*D+ == 'plugins') ,addlugins = true;
- else if (args*D+ == 'thees') ,addlugins = false;
-
append!ddon(args*6+ args*D+);-
fs.Frite%ile0ync(js/tinyce/tinyce.full.js full>ontent);-);
desc(Bundles in the plugins/thees Fithout inifying including j7uery into a tinyce.jquery.full.jsfile);tas(&undle1full1jquery *default+ function (paras) ,
var input%iles full>ontent addlugins = true;
function append!ddon (nae) ,if (addlugins) ,
if (nae == '?') ,glo&.sync('js/tinyce/plugins/?/plugin.js').for8ach(function (fileath) ,
full>ontent A= Cn; A fs.read%ile0ync(fileath).to0tring();-);
- else ,full>ontent A= Cn; A fs.read%ile0ync(js/tinyce/plugins/ A nae A
/plugin.js).to0tring();-
- else ,if (nae == '?') ,
glo&.sync('js/tinyce/thees/?/thee.in.js').for8ach(function (fileath),
full>ontent A= Cn; A fs.read%ile0ync(fileath).to0tring();-);
- else ,full>ontent A= Cn; A fs.read%ile0ync(js/tinyce/thees/ A nae A
/thee.js).to0tring();
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 7/13
--
-
full>ontent = fs.read%ile0ync(js/tinyce/tinyce.jquery.js).to0tring();
if (arguents*D+ == '?') ,arguents = *'thees@?' 'plugins@?'+;-
for (var i = D; i E arguents.length; iAA) ,var args = arguents*i+.split('@');
if (args*D+ == 'plugins') ,addlugins = true;
- else if (args*D+ == 'thees') ,addlugins = false;
-
append!ddon(args*6+ args*D+);-
fs.Frite%ile0ync(js/tinyce/tinyce.jquery.full.js full>ontent);-);
desc($uns 80"int on all source files);tas(eslint *eslint1core eslint1thees eslint1plugins+);
desc($uns 80"int on core);tas(eslint1core *+ function() ,
eslint(,src@ *
js/tinyce/classes/??/?.js+
-);-);
desc($uns 80"int on thees);tas(eslint1thees *+ function() ,
eslint(,src@ *
js/tinyce/thees/??/thee.js+
-);-);
desc($uns 80"int on plugins);tas(eslint1plugins *+ function() ,
eslint(,
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 8/13
src@ *js/tinyce/plugins/??/plugin.jsjs/tinyce/plugins/??/classes/?.js5js/tinyce/plugins/ta&le/plugin.js5js/tinyce/plugins/paste/plugin.js5js/tinyce/plugins/spellchecer/plugin.js
+-);-);
desc($uns 0int on all source files);tas(jshint *jshint1core jshint1plugins jshint1thees+ function () ,-);
desc($uns 0int on core source files);tas(jshint1core *+ function () ,
jshint(,patterns@ *js/tinyce/classes/??/?.js+-);-);
desc($uns 0int on plugins files);tas(jshint1plugins *+ function () ,
jshint(,patterns@ *
js/tinyce/plugins/??/plugin.jsjs/tinyce/plugins/??/classes/??/?.js
+
e2clude@ *js/tinyce/plugins/ta&le/plugin.jsjs/tinyce/plugins/spellchecer/plugin.jsjs/tinyce
/plugins/paste/plugin.js+
-);-);
desc($uns 0int on thee files);tas(jshint1thees *+ function () ,
jshint(,patterns@ *js/tinyce/thees/??/thee.js js/tinyce/thees/??/classes/??/?.js+-);-);
desc($uns 0int on tests);tas(jshint1tests *+ function () ,
jshint(, jshintrc@ 'tests/.jshintrc'patterns@ *
tests/tinyce/??/?.jstests/plugins/??/?.js
+
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 9/13
e2clude@ *tests/plugins/js/autolin.actions.jstests/plugins/js/dsl.jstests/plugins/js/states.js
+-);
-);
desc(>opiles "800 sins to >00);tas(less *+ function () ,
var less%iles;
less%iles = *$eset.lessGaria&les.lessi2ins.less!niations.lessTiny>8.less
+.concat(parse"ess#ocs(js/tinyce/tinyce.js));
fs.readdir0ync(js/tinyce/sins).for8ach(function(sin<ae) ,if (sin<ae.char!t(D) == '.') ,
return;-
// odern &roFsersless(,
&ase#ir@ js/tinyce/sins/ A sin<ae A fro@ less%iles.concat(*9cons.less+)to>ss@ js/tinyce/sins/ A sin<ae A /sin.in.cssto"ess@ js/tinyce/sins/ A sin<ae A /sin.lessto"ess#ev@ js/tinyce/sins/ A sin<ae A /sin.dev.less
-);
// 98Hless(,
&ase#ir@ js/tinyce/sins/ A sin<ae A fro@ less%iles.concat(*9cons.9eH.less+)to>ss@ js/tinyce/sins/ A sin<ae A /sin.ieH.in.cssto"ess@ js/tinyce/sins/ A sin<ae A /sin.ieH.less
-);
// >ontent >00less(,
fro@ *>ontent.less+to>ss@ js/tinyce/sins/ A sin<ae A /content.in.css&ase#ir@ js/tinyce/sins/ A sin<ae A force@ true
-);
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 10/13
// >ontent >00 (inline)less(,
fro@ *>ontent.9nline.less+to>ss@ js/tinyce/sins/ A sin<ae A /content.inline.in.css&ase#ir@ js/tinyce/sins/ A sin<ae A
force@ true-);-);
-);
tas(tp *+ function() ,if (5fs.e2ists0ync(tp)) ,
fs.dir0ync(tp);-
-);
desc(Builds release pacages as zip files);tas(release *default nuget zip1production zip1production1jquery zip1developentjshint eslint+);
tas(zip1production *tp+ function () ,var details = get$elease#etails(changelog.t2t);
zip(,&ase#ir@ tinyce
e2clude@ *js/tinyce/tinyce.jsjs/tinyce/tinyce.dev.jsjs/tinyce/tinyce.full.jsjs/tinyce/tinyce.full.in.jsjs/tinyce/tinyce.jquery.jsjs/tinyce/tinyce.jquery.in.jsjs/tinyce/tinyce.jquery.dev.jsjs/tinyce/tinyce.jquery.full.jsjs/tinyce/jquery.tinyce.in.jsjs/tinyce/plugins/visual&locs/igjs/tinyce/plugins/copatI2reade.d/(iageanagerfileanagero2ieanager)//pluginC.jspluginC.devC.jstheeC.js//classes//.AC.less//C.json/
+
fro@ *js
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 11/13
changelog.t2t"9>8<08.T:Treade.d
+
to@ tp/tinyceJ A details.version A .zip
-);-);
tas(zip1production1jquery *tp+ function () ,var details = get$elease#etails(changelog.t2t);
zip(,&ase#ir@ tinyce
path%ilter@ function(args) ,if (args.zip%ileath == js/tinyce/tinyce.jquery.in.js) ,
args.zip%ileath = js/tinyce/tinyce.in.js;-
-
e2clude@ *js/tinyce/tinyce.jsjs/tinyce/tinyce.in.jsjs/tinyce/tinyce.dev.jsjs/tinyce/tinyce.full.jsjs/tinyce/tinyce.full.in.jsjs/tinyce/tinyce.jquery.jsjs/tinyce/tinyce.jquery.dev.jsjs/tinyce/tinyce.jquery.full.jsjs/tinyce/plugins/visual&locs/igjs/tinyce/plugins/copatI2reade.d/(iageanagerfileanagero2ieanager)//pluginC.jspluginC.devC.jstheeC.js//classes//.AC.less//C.json/
+
fro@ *jschangelog.t2t"9>8<08.T:Treade.d
+
to@ tp/tinyceJ A details.version A Jjquery.zip-);
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 12/13
-);
tas(zip1developent *tp+ function () ,var details = get$elease#etails(changelog.t2t);
zip(,
&ase#ir@ tinyce
e2clude@ *js/tinyce/tinyce.full.in.js/(iageanagerfileanagero2ieanager)/
+
fro@ *jsteststoolschangelog.t2t"9>8<08.T:Treade.daefile.jspacage.json
+
to@ tp/tinyceJ A details.version A Jdev.zip-);
-);
tas(nuget *tp+ function () ,var details = get$elease#etails(changelog.t2t);
nuget(,cd@ 'tp/nuget.e2e'nuspec@ *'tools/nuget/Tiny>8.nuspec' 'tools/nuget/Tiny>8.jquery.nuspec'+version@ details.versiondest@ 'tp'quiet@ true
-);-);
tas(instruent1plugin *+ function(plugin<ae) ,if (plugin<ae) ,
instruent%ile(,fro@ js/tinyce/plugins/ A plugin<ae A /plugin.jsto@ js/tinyce/plugins/ A plugin<ae A /plugin.in.js
-);-
-);
7/17/2019 Phantom Gs
http://slidepdf.com/reader/full/phantom-gs 13/13
desc($uns qunit tests in phantojs);tas(phantojs1tests *+ function(plugin<ae) ,
phantojs(*tests/js/runner.js tests/inde2.htl+);-);
desc($uns qunit tests in saucela&s);
tas(saucela&s1tests *+ function(plugin<ae) ,saucela&s.qunit(,testnae@ 'Tiny>8 7Knit Tests'urls@ *'http@//6LH.D.D.6@MMMM/tests/inde2.htlNin=true'+&roFsers@ *
,&roFser<ae@ 'firefo2' platfor@ ':'-,&roFser<ae@ 'googlechroe' platfor@ ':'-,&roFser<ae@ 'internet e2plorer' version@ 'O' platfor@ ':'-,&roFser<ae@ 'internet e2plorer' version@ 'M' platfor@ 'PindoFs H'-,&roFser<ae@ 'internet e2plorer' version@ '6D' platfor@ 'PindoFs H'-,&roFser<ae@ 'internet e2plorer' version@ '66' platfor@ 'PindoFs H'-,&roFser<ae@ 'safari' version@ 'H' platfor@ '40 : 6D.M'-,&roFser<ae@ safari version@ Q platfor@ 40 : 6D.O-//,&roFser<ae@ ipad version@ H platfor@ 40 : 6D.M-,&roFser<ae@ 'firefo2' platfor@ '"inu2'-,&roFser<ae@ 'googlechroe' platfor@ '"inu2'-
+-);
-);
desc(>leans the &uild directories);tas(clean *+ function () ,
*tp/?js/tinyce/tinyce?js/tinyce/??/?.in.jsjs/tinyce/??/?.dev.jsjs/tinyce/plugins/ta&le/plugin.jsjs/tinyce/sins/??/?.in.cssjs/tinyce/sins/??/sin.less
+.for8ach(function(pattern) ,glo&.sync(pattern).for8ach(function(fileath) ,
fs.unlin0ync(fileath);-);
-);-);