【亲测免费】 开源项目 `script-ext-html-webpack-plugin` 使用教程
2026-01-18 09:45:42作者:齐冠琰
1. 项目的目录结构及介绍
script-ext-html-webpack-plugin/
├── LICENSE
├── README.md
├── lib
│ ├── index.js
│ └── options.js
├── package.json
└── test
├── index.js
└── test-cases
├── async-scripts
│ ├── index.js
│ └── template.html
├── defer-async-scripts
│ ├── index.js
│ └── template.html
├── defer-scripts
│ ├── index.js
│ └── template.html
├── inline-async-scripts
│ ├── index.js
│ └── template.html
├── inline-defer-scripts
│ ├── index.js
│ └── template.html
├── inline-scripts
│ ├── index.js
│ └── template.html
├── no-scripts
│ ├── index.js
│ └── template.html
├── preload-scripts
│ ├── index.js
│ └── template.html
└── sync-scripts
├── index.js
└── template.html
目录结构介绍
LICENSE: 项目许可证文件。README.md: 项目说明文档。lib: 包含项目的主要代码文件。index.js: 插件的主入口文件。options.js: 插件的配置选项处理文件。
package.json: 项目的依赖管理文件。test: 包含项目的测试文件。index.js: 测试的主入口文件。test-cases: 包含各种测试用例。async-scripts,defer-async-scripts,defer-scripts,inline-async-scripts,inline-defer-scripts,inline-scripts,no-scripts,preload-scripts,sync-scripts: 不同场景的测试用例。index.js: 每个测试用例的入口文件。template.html: 每个测试用例的模板文件。
2. 项目的启动文件介绍
项目的启动文件位于 lib/index.js。这个文件是插件的主入口,负责初始化和应用插件的主要逻辑。
主要功能
- 初始化插件实例。
- 处理配置选项。
- 在 Webpack 构建过程中注入脚本标签。
3. 项目的配置文件介绍
项目的配置文件主要是 package.json 和 lib/options.js。
package.json
package.json 文件包含了项目的元数据和依赖信息。
{
"name": "script-ext-html-webpack-plugin",
"version": "2.1.5",
"description": "Enhances html-webpack-plugin functionality with async, defer, type='module', preload, prefetch and custom attributes for your script tags.",
"main": "lib/index.js",
"scripts": {
"test": "mocha --recursive"
},
"repository": {
"type": "git",
"url": "git+https://github.com/numical/script-ext-html-webpack-plugin.git"
},
"keywords": [
"webpack",
"plugin",
"html-webpack-plugin",
"async",
"defer",
"module",
"preload",
"prefetch"
],
"author": "Mike Evans <mike.evans@numical.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/numical/script-ext-html-webpack-plugin/issues"
},
"homepage": "https://github.com/numical/script-ext-html-webpack-plugin#readme",
"dependencies": {
"html-webpack-plugin": "^4.0.0-beta.5",
"lodash.merge": "^4.6.2"
},
"devDependencies": {
"chai": "^4.2.0",
"mocha": "^6.1.4",
登录后查看全文
热门项目推荐
相关项目推荐
atomcodeClaude Code 的开源替代方案。连接任意大模型,编辑代码,运行命令,自动验证 — 全自动执行。用 Rust 构建,极致性能。 | An open-source alternative to Claude Code. Connect any LLM, edit code, run commands, and verify changes — autonomously. Built in Rust for speed. Get StartedRust0446
源启盛夏_AtomGit暑期开发者成长计划「源启盛夏」暑期校园开发者成长计划旨在激活校园开源力量,通过积分激励、认证扶持、资源倾斜等形式,引导高校组织和开发者完成「入驻 — 建项目 — 做贡献 — 获认证 — 得资源」的完整闭环。无论你是想带领社团入驻平台的组织者,还是希望用代码贡献证明自己的开发者,都能在这里找到属于你的成长路径。Markdown00
jiuwenswarmJiuwenSwarm 是一款基于openJiuwen开发的智能AI Agent,它能够将大语言模型的强大能力,通过你日常使用的各类通讯应用,直接延伸至你的指尖。Python0761
Hy3Hy3 是由腾讯混元团队研发的快慢思考融合的混合专家模型,总参数量 295B,激活参数 21B,MTP 层参数 3.8B。4 月底发布 Hy3 Preview 后,我们在 50 多个业务中获得了广泛的反馈,修复了各种体验问题,进一步提升了后训练的质量和规模。今天,我们发布 Hy3。它展现出显著强于同尺寸并比肩旗舰(参数规模往往是 Hy3 的 2~5 倍)开源模型的智能水平,显著提升了在各类产品和生产力任务中的实用价值。Python00
AscendNPU-IRAscendNPU-IR是基于MLIR(Multi-Level Intermediate Representation)构建的,面向昇腾亲和算子编译时使用的中间表示,提供昇腾完备表达能力,通过编译优化提升昇腾AI处理器计算效率,支持通过生态框架使能昇腾AI处理器与深度调优C++0310
DragonOSDragonOS is an operating system developed from scratch using Rust, with Linux compatibility. It is designed for **Serverless** scenarios. 使用Rust从0自研内核,具有Linux兼容性的操作系统,面向云计算Serverless场景而设计。Rust00
项目优选
收起
openEuler内核是openEuler操作系统的核心,既是系统性能与稳定性的基石,也是连接处理器、设备与服务的桥梁。
C
494
515
deepin linux kernel
C
32
16
Ascend Extension for PyTorch
Python
799
1.13 K
本项目是CANN提供的神经网络类计算算子库,实现网络在NPU上加速计算。
C++
780
1.57 K
本项目是CANN提供的transformer类大模型算子库,实现网络在NPU上加速计算。
C++
964
2.27 K
本仓将收集和展示高质量的仓颉示例代码,欢迎大家投稿,让全世界看到您的妙趣设计,也让更多人通过您的编码理解和喜爱仓颉语言。
C
830
6.18 K
本项目是CANN提供的数学类基础计算算子库,实现网络在NPU上加速计算。
C++
1.2 K
1.24 K
AtomGit CLI (ag cli),AtomGit 命令行工具,参考 GitHub CLI (gh) 开发。
目前 atomgit-cli 项目已在 AtomCode 的 Coding Plan 项目列表中
Go
39
24
CANN 学习中心仓,支持在线互动运行、边学边练,提供教程、示例与优化方案,一站式助力昇腾开发者快速上手。
Jupyter Notebook
641
275
暂无描述
Markdown
825
5.48 K