Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
657b52a067 | ||
|
|
d8c1de0fa8 | ||
|
|
81a688d532 |
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,5 +1,15 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.0.6 (2026-06-09)
|
||||||
|
|
||||||
|
### Breaking Changes
|
||||||
|
- **ESM Deprecation**: Completely removed ESM exports to align with the "zero-boilerplate" project philosophy. The library now relies solely on global injection via `globalThis`.
|
||||||
|
- **Build Format**: Switched build output to IIFE format only.
|
||||||
|
|
||||||
|
### Improvements
|
||||||
|
- **Integration**: Simplified dependency handling for `@apigo.cc/state` by using global variables.
|
||||||
|
- **Docs**: Updated README with new versioning and non-ESM usage instructions.
|
||||||
|
|
||||||
## 1.0.5 (2026-06-05)
|
## 1.0.5 (2026-06-05)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
10
README.md
10
README.md
@ -3,14 +3,16 @@
|
|||||||
Bootstrap 5.3 自包含集成引擎。
|
Bootstrap 5.3 自包含集成引擎。
|
||||||
|
|
||||||
## 0. 快速开始 (Quick Start)
|
## 0. 快速开始 (Quick Start)
|
||||||
直接在 HTML 中引入(无需打包):
|
直接在 HTML 中引入(无需打包,完全非 ESM 注入):
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/bootstrap@1.0.5/dist/bootstrap.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/bootstrap@1.0.6/dist/bootstrap.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
## 1. 运行时接口
|
## 1. 运行时接口
|
||||||
- **`bootstrap`**: (Object) 官方原生 Bootstrap 镜像。
|
- **`bootstrap`**: (Object) 官方原生 Bootstrap 镜像。已挂载至 `globalThis.bootstrap`。
|
||||||
- **`Bootstrap`**: (Object) 增强控制接口。
|
- **`Bootstrap`**: (Object) 增强控制接口。已挂载至 `globalThis.Bootstrap`。
|
||||||
|
|
||||||
|
*(注意:本库自 v1.0.6 起全面废弃 ESM 导出,改为纯全局注入模式。)*
|
||||||
|
|
||||||
## 2. API 参考
|
## 2. API 参考
|
||||||
|
|
||||||
|
|||||||
13
dist/bootstrap.js
vendored
13
dist/bootstrap.js
vendored
@ -2120,9 +2120,7 @@ url("data:font/woff;base64,d09GRgABAAAAAsBAAAsAAAAHavgAAQAAAAAAAAAAAAAAAAAAAAAAA
|
|||||||
console.error("vite-plugin-css-injected-by-js", e);
|
console.error("vite-plugin-css-injected-by-js", e);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
(function(global, factory) {
|
var ApigoBootstrap = function(exports) {
|
||||||
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@apigo.cc/state")) : typeof define === "function" && define.amd ? define(["exports", "@apigo.cc/state"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.ApigoBootstrap = {}));
|
|
||||||
})(this, function(exports2) {
|
|
||||||
"use strict";
|
"use strict";
|
||||||
var top = "top";
|
var top = "top";
|
||||||
var bottom = "bottom";
|
var bottom = "bottom";
|
||||||
@ -7279,7 +7277,8 @@ url("data:font/woff;base64,d09GRgABAAAAAsBAAAsAAAAHavgAAQAAAAAAAAAAAAAAAAAAAAAAA
|
|||||||
globalThis.bootstrap = bootstrap;
|
globalThis.bootstrap = bootstrap;
|
||||||
globalThis.Bootstrap = Bootstrap;
|
globalThis.Bootstrap = Bootstrap;
|
||||||
}
|
}
|
||||||
exports2.Bootstrap = Bootstrap;
|
exports.Bootstrap = Bootstrap;
|
||||||
exports2.default = Bootstrap;
|
exports.default = Bootstrap;
|
||||||
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
||||||
});
|
return exports;
|
||||||
|
}({});
|
||||||
|
|||||||
4
dist/bootstrap.min.js
vendored
4
dist/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2128
dist/bootstrap.min.mjs
vendored
2128
dist/bootstrap.min.mjs
vendored
File diff suppressed because one or more lines are too long
7282
dist/bootstrap.mjs
vendored
7282
dist/bootstrap.mjs
vendored
File diff suppressed because one or more lines are too long
@ -1,9 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "@apigo.cc/bootstrap",
|
"name": "@apigo.cc/bootstrap",
|
||||||
"version": "1.0.5",
|
"version": "1.0.7",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/bootstrap.js",
|
"main": "dist/bootstrap.js",
|
||||||
"module": "dist/bootstrap.js",
|
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
|
|||||||
@ -17,13 +17,13 @@ export default defineConfig({
|
|||||||
lib: {
|
lib: {
|
||||||
entry: resolve(__dirname, 'src/index.js'),
|
entry: resolve(__dirname, 'src/index.js'),
|
||||||
name: 'ApigoBootstrap',
|
name: 'ApigoBootstrap',
|
||||||
formats: ['umd', 'es']
|
formats: ['iife']
|
||||||
},
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
external: ['@apigo.cc/state'],
|
external: ['@apigo.cc/state'],
|
||||||
output: [
|
output: [
|
||||||
{
|
{
|
||||||
format: 'umd',
|
format: 'iife',
|
||||||
name: 'ApigoBootstrap',
|
name: 'ApigoBootstrap',
|
||||||
entryFileNames: 'bootstrap.js',
|
entryFileNames: 'bootstrap.js',
|
||||||
globals: {
|
globals: {
|
||||||
@ -31,22 +31,13 @@ export default defineConfig({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
format: 'umd',
|
format: 'iife',
|
||||||
name: 'ApigoBootstrap',
|
name: 'ApigoBootstrap',
|
||||||
entryFileNames: 'bootstrap.min.js',
|
entryFileNames: 'bootstrap.min.js',
|
||||||
globals: {
|
globals: {
|
||||||
'@apigo.cc/state': 'ApigoState'
|
'@apigo.cc/state': 'ApigoState'
|
||||||
},
|
},
|
||||||
plugins: [terser()]
|
plugins: [terser()]
|
||||||
},
|
|
||||||
{
|
|
||||||
format: 'es',
|
|
||||||
entryFileNames: 'bootstrap.mjs'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
format: 'es',
|
|
||||||
entryFileNames: 'bootstrap.min.mjs',
|
|
||||||
plugins: [terser()]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user