在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):passy/google-cdn开源软件地址(OpenSource Url):https://github.com/passy/google-cdn开源编程语言(OpenSource Language):JavaScript 98.2%开源软件介绍(OpenSource Introduction):google-cdn
This module makes it easy to replace references to your bower resources in your app with links to the libraries on the Google CDN (and some other CDNs). Getting startedInstall: Install CDN data module: Examplebower.json: {
"name": "my-awesome-app",
"dependencies": {
"jquery": "~2.0.0"
}
} var googlecdn = require('google-cdn');
var bowerConfig = loadJSON('bower.json');
var markup = '<script src="bower_components/jquery/jquery.js"></script>';
googlecdn(markup, bowerConfig, {cdn: require('google-cdn-data')}, function (err, result) {
if (err) {
throw err;
}
assert.equal(result,
'<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>');
}); APIgooglecdn(content, bowerJson[, options], callback)Replaces references to libraries supported by the Google CDN in
{
jquery: {
versions: ['2.0.3', '2.0.2', '2.0.1', '2.0.0'],
url: function (version) {
return '//my.own.cdn/libs/jquery/' + version + '/jquery.min.js';
}
}
} Used byCDN data modulesDebuggingYou can turn on debugging by setting the
LicenseBSD |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论