Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function buildCDNPackage( callback ) {
console.log( "Building CDN package" );
var JqueryUi = require( "download.jqueryui.com/lib/jquery-ui" );
var Package = require( "download.jqueryui.com/lib/package-1-12-themes" );
var Packager = require( "node-packager" );
var jqueryUi = new JqueryUi( path.resolve( "." ) );
var target = fs.createWriteStream( "../" + jqueryUi.pkg.name + "-" + jqueryUi.pkg.version + "-cdn.zip" );
var packager = new Packager( jqueryUi.files().cache, Package, {
components: jqueryUi.components().map( function( component ) {
return component.name;
} ),
jqueryUi: jqueryUi,
themeVars: null
} );
packager.ready.then( function() {
addManifest( packager );
packager.toZip( target, {
basedir: ""
}, function( error ) {
if ( error ) {
Release.abort( "Failed to zip CDN package", error );
}