
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
fis-postpackager-autoload
Advanced tools
a postpackager plugin for fis to auto load required resource
用于自动加载模块化资源的FIS插件
<script src="path"></script> 或 <link rel="stylesheet" href="path"> 标签引用资源,页面依赖的资源会自动加载,实现像写Node.js程序一样编写前端页面。插件默认会将引用的资源添加至head标签结尾,如果需要定制位置,可以通过在页面中注入占位符来满足需求
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<!--STYLE_PLACEHOLDER-->
</head>
<body>
<div class="main"></div>
<!--SCRIPT_PLACEHOLDER-->
<!--RESOURCEMAP_PLACEHOLDER-->
<script type="text/javascript">
require('main');
</script>
</body>
</html>
目前支持三种占位符
<!--SCRIPT_PLACEHOLDER--> 用于指定脚本输出位置<!--RESOURCEMAP_PLACEHOLDER--> 用于指定异步脚本资源表输出位置,需要在mod.js引用后,异步请求前输出<!--STYLE_PLACEHOLDER--> 用于指定样式输出位置$ npm install -g fis-postpackager-autoload
$ vi path/to/project/fis-conf.js
// file : path/to/project/fis-conf.js
fis.config.set('modules.postpackager', 'autoload');
// 添加combine插件,自动应用pack配置,打包零散资源
//fis.config.set('modules.postpackager', 'autoload, simple');
// useSiteMap设置使用整站/页面异步资源表配置,默认为false
fis.config.set('settings.postpackager.autoload.useSiteMap', true);
// useInlineMap设置内联resourceMap还是异步加载resourceMap,默认为false
fis.config.set('settings.postpackager.autoload.useInlineMap', true);
//通过include属性将额外的资源增加入resourceMap中
fis.config.set('settings.postpackager.autoload.include', /^\/somepath\//i);
// 设置占位符
fis.config.set('settings.postpackager.autoload.scriptTag', '<!--SCRIPT_PLACEHOLDER-->');
fis.config.set('settings.postpackager.autoload.styleTag', '<!--STYLE_PLACEHOLDER-->');
fis.config.set('settings.postpackager.autoload.resourceMapTag', '<!--RESOURCEMAP_PLACEHOLDER-->');
// 开启AMD模式
fis.config.set('settings.postpackager.autoload.type', 'requirejs');
// 美化resourceMap,即使开启压缩,也不会压缩resourceMap
fis.config.set('settings.postpackager.autoload.beautyResourceMap', true);
FAQs
a postpackager plugin for fis to auto load required resource
The npm package fis-postpackager-autoload receives a total of 8 weekly downloads. As such, fis-postpackager-autoload popularity was classified as not popular.
We found that fis-postpackager-autoload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.