在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):bestander/gulp-deploy-azure-cdn开源软件地址(OpenSource Url):https://github.com/bestander/gulp-deploy-azure-cdn开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-deploy-azure-cdnA Gulp plugin for for uploading files to Azure Blob Storage. Wraps a vanilla node package https://github.com/bestander/deploy-azure-cdn. It is perfect for deploying compiled assets to Microsoft Azure CDN as a last step in a Continuous Integration setup. Features
Installing
UsingDeploying a set of files to a path in blob storagevar deployCdn = require('gulp-deploy-azure-cdn');
var gulp = require('gulp');
var gutil = require('gulp-util');
gulp.task('upload-app-to-azure', function () {
return gulp.src(['*.js','*.json'], {
base: 'node_modules/deploy-azure-cdn' // optional, the base directory in which the file is located. The relative path of file to this directory is used as the destination path
}).pipe(deployCdn({
containerName: 'test', // container name in blob
serviceOptions: ['blobstoragename', '/OwQ/MyLongSecretStringFromAzureConfigPanel'], // custom arguments to azure.createBlobService
folder: '1.2.35-b27', // path within container
zip: true, // gzip files if they become smaller after zipping, content-encoding header will change if file is zipped
deleteExistingBlobs: true, // true means recursively deleting anything under folder
concurrentUploadThreads: 10, // number of concurrent uploads, choose best for your network condition
metadata: {
cacheControl: 'public, max-age=31530000', // cache in browser
cacheControlHeader: 'public, max-age=31530000' // cache in azure CDN. As this data does not change, we set it to 1 year
},
testRun: false // test run - means no blobs will be actually deleted or uploaded, see log messages for details
})).on('error', gutil.log);
}); Parameters
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论