【亲测免费】 开源项目 `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 StartedRust0212
cann-learning-hubCANN 学习中心仓,支持在线互动运行、边学边练,提供教程、示例与优化方案,一站式助力昇腾开发者快速上手。Jupyter Notebook0137
JoyAI-EchoJoyAI-Echo,这是一个独立的、仅用于推理的版本,旨在实现分钟级多镜头音视频生成。它采用了经过蒸馏的DMD生成器、配对的跨模态记忆以及故事级别的一致性。其性能的核心在于,一个跨模态视听记忆库能够在长达五分钟的视频中保持角色外观和语音音色的一致性。同时,一个训练后处理流程将基于记忆的强化学习与分布匹配蒸馏相结合,实现了7.5倍的速度提升,显著增强了视觉质量和对齐效果。00
GLM-5.2智谱开源 GLM-5.2,这是针对长文本任务的最新旗舰模型。相较于前代产品 GLM-5.1,它在长文本任务处理能力上实现了显著飞跃,并且首次在稳定的 100 万 token 上下文中提供这一能力。Jinja00
SwanLab⚡️SwanLab - an open-source, modern-design AI training tracking and visualization tool. Supports Cloud / Self-hosted use. Integrated with PyTorch / Transformers / LLaMA Factory / veRL/ Swift / Ultralytics / MMEngine / Keras etc.Python00
tiny-universe《大模型白盒子构建指南》:一个全手搓的Tiny-UniverseJupyter Notebook03
项目优选
收起
deepin linux kernel
C
32
16
openEuler内核是openEuler操作系统的核心,既是系统性能与稳定性的基石,也是连接处理器、设备与服务的桥梁。
C
468
461
暂无描述
Dockerfile
775
5.07 K
Ascend Extension for PyTorch
Python
756
960
本项目是CANN提供的transformer类大模型算子库,实现网络在NPU上加速计算。
C++
872
2.01 K
本项目是CANN提供的神经网络类计算算子库,实现网络在NPU上加速计算。
C++
696
1.4 K
昇腾LLM分布式训练框架
Python
183
230
本项目是CANN提供的数学类基础计算算子库,实现网络在NPU上加速计算。
C++
1.1 K
1.14 K
本仓库是 Flutter SDK 与 Flutter Engine 的 OpenHarmony 适配版本,由 CPF-Flutter 团队维护。开发者可使用熟悉的 Flutter 技术栈开发 OpenHarmony 应用,3.35.7 及以后的适配版本可基于本仓库源码构建支持 OpenHarmony 的 Flutter Engine。
Dart
1.03 K
271
Oohos_react_native
React Native鸿蒙化仓库
C++
361
430