【文件属性】:
文件名称:load.js:动态加载外部JavaScript和CSS文件
文件大小:5KB
文件格式:ZIP
更新时间:2021-01-28 18:07:56
javascript css parallel ajax series
Load.js
动态加载外部JavaScript和CSS文件
安装
npm install load.js
如何使用?
const load = require ( 'load' ) ;
/* you could use jquery functions here */
await load . js ( 'jquery.js' ) ;
/* load menu css and then do some magic */
await load . css ( 'menu.css' ) ;
/* recognition file type by extension */
const [ e , event ] = await tryToCatch ( load , 'css-or-.js' ) ;
const [ e , footer ] = await tryToCatch ( load , 'template/footer.html' ) ;
const [ e , config ] = await tryToCatch ( load . json , 'config.json'
【文件预览】:
load.js-master
----.eslintrc.json(199B)
----.gitignore(51B)
----.babelrc(55B)
----package.json(1KB)
----.travis.yml(164B)
----LICENSE(1KB)
----ChangeLog(944B)
----madrun.js(324B)
----README.md(812B)
----lib()
--------load.js(3KB)
----.npmignore(43B)