| Server IP : 23.111.136.34 / Your IP : 216.73.216.136 Web Server : Apache System : Linux servidor.eurohost.com.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : meusitei ( 1072) PHP Version : 5.6.40 Disable Function : show_source, system, shell_exec, passthru, proc_open MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/meusitei/public_html/painel/assets/plugins/jquery.maskedinput/ |
Upload File : |
var Handlebars=require("handlebars"),
fs = require("fs"),
path = require ("path"),
UglifyJS = require("uglify-js"),
distPath='dist/';
Handlebars.registerHelper('include', function(context) {
return fs.readFileSync(context,'utf8');
});
function keepComment(node,comment){
return comment.type === "comment2";
}
task('clean',function(){
fs.rmdir(distPath)
});
task('default',['clean'], function (params) {
fs.mkdir(distPath,0755);
var options = JSON.parse(fs.readFileSync('plugin.json','utf8'))
options.Year=new Date().getFullYear()
var template = Handlebars.compile(fs.readFileSync('templates/jquery.maskedinput.template','utf8'));
var debugFile = path.join(distPath,'jquery.maskedinput.jss');
fs.writeFileSync(debugFile,template(options));
compressed = UglifyJS.minify(debugFile,{output:{comments:keepComment}});
fs.writeFileSync(path.join(distPath,'jquery.maskedinput.min.js'), compressed.code);
});