CDN引入版本规范

2019-04-23  本文已影响0人  xilong

CDN引入版本规范

// load any project hosted on npm

https://cdn.jsdelivr.net/npm/package@version/file


// load jQuery v3.2.1

  https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js


// use a version range instead of a specific version

  https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js

    https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js


// omit the version completely to get the latest one

// you should NOT use this in production

    https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js


// add ".min" to any JS/CSS file to get a minified version

// if one doesn't exist, we'll generate it for you

    https://cdn.jsdelivr.net/npm/jquery@3.2.1/src/core.min.js


// omit the file path to get the default file

    https://cdn.jsdelivr.net/npm/jquery@3.2


// add / at the end to get a directory listing

    https://cdn.jsdelivr.net/npm/jquery/
上一篇 下一篇

猜你喜欢

热点阅读