我一直在http://jqueryui.com/download寻找类似下载生成器的东西。
我有一些代码片段和插件,我希望能够逐个项目地从中进行选择。我并不总是需要项目中的所有功能,因此我想通过复选框选择单个片段,并将它们全部下载到单个 js 文件中。
我一直在http://jqueryui.com/download寻找类似下载生成器的东西。
我有一些代码片段和插件,我希望能够逐个项目地从中进行选择。我并不总是需要项目中的所有功能,因此我想通过复选框选择单个片段,并将它们全部下载到单个 js 文件中。
Another thing you may want to do is write simple build scripts using GearJS by Yahoo. It allows you to very simply select a group of files then say concatenate them, and minify them. An example queue would look something like this:
var gear= require('gear');
new gear.Queue({registry: new gear.Registry({module: 'gear-lib'})})
.log('Starting javascript build...')
.log('Reading js files...')
.read([
'js/app.js',
'js/autoflex.js',
'js/bootstrap.js',
'js/jquery.history.js',
'js/templates.js'])
.log('concatenating files...')
.concat()
.log('minifying...')
.jsminify()
.log('saving to js/app.min.js')
.write('js/app.min.js')
.run(function(err, results) {
if(err) {
console.log(err);
return;
}
console.log(('' + results[0]).length + ' characters');
});
So, this runs with node. You could make a small set of builds using each snippet (app1.build.js->app1.min.js, myapp.build.js->myapp.min.js, etc.) It's not a GUI, but it is a very nice way to perform a set of actions on a group of javascript files.