@modern-js/image 0.0.0-next-20250416073604
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +23 -0
- package/dist/cli.d.ts +6 -0
- package/dist/index.cjs +53 -0
- package/dist/index.d.ts +3 -0
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +4 -0
- package/dist/types.d.ts +1 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-present Modern.js
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Rslib project
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
Install the dependencies:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm install
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Get started
|
|
12
|
+
|
|
13
|
+
Build the library:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm build
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Build the library in watch mode:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm dev
|
|
23
|
+
```
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AppTools, CliPluginFuture } from '@modern-js/app-tools';
|
|
2
|
+
import { type PluginImageOptions as BuilderPluginImageOptions } from '@rsbuild-image/core';
|
|
3
|
+
export interface ImagePluginOptions extends BuilderPluginImageOptions {
|
|
4
|
+
}
|
|
5
|
+
export declare const imagePlugin: (options?: ImagePluginOptions) => CliPluginFuture<AppTools<"shared">>;
|
|
6
|
+
export default imagePlugin;
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
default: ()=>cli,
|
|
28
|
+
imagePlugin: ()=>imagePlugin
|
|
29
|
+
});
|
|
30
|
+
const core_namespaceObject = require("@rsbuild-image/core");
|
|
31
|
+
const imagePlugin = (options = {})=>({
|
|
32
|
+
name: '@modern-js/image',
|
|
33
|
+
setup: (api)=>{
|
|
34
|
+
const { ...builderPluginOptions } = options;
|
|
35
|
+
builderPluginOptions.ipx ||= {};
|
|
36
|
+
builderPluginOptions.ipx.basename ||= '/_modern/ipx';
|
|
37
|
+
api.config(()=>({
|
|
38
|
+
builderPlugins: [
|
|
39
|
+
(0, core_namespaceObject.pluginImage)(builderPluginOptions)
|
|
40
|
+
]
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const cli = imagePlugin;
|
|
45
|
+
exports["default"] = __webpack_exports__["default"];
|
|
46
|
+
exports.imagePlugin = __webpack_exports__.imagePlugin;
|
|
47
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
48
|
+
"default",
|
|
49
|
+
"imagePlugin"
|
|
50
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
51
|
+
Object.defineProperty(exports, '__esModule', {
|
|
52
|
+
value: true
|
|
53
|
+
});
|
package/dist/index.d.ts
ADDED
package/dist/runtime.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__rsbuild_image_react_addb933f__ from "@rsbuild-image/react";
|
|
2
|
+
export * from "@rsbuild-image/core/shared";
|
|
3
|
+
var __webpack_exports__Image = __WEBPACK_EXTERNAL_MODULE__rsbuild_image_react_addb933f__.Image;
|
|
4
|
+
export { __webpack_exports__Image as Image };
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@rsbuild-image/core/types';
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@modern-js/image",
|
|
3
|
+
"version": "0.0.0-next-20250416073604",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./runtime": {
|
|
15
|
+
"types": "./dist/runtime.d.ts",
|
|
16
|
+
"import": "./dist/runtime.js",
|
|
17
|
+
"require": "./dist/runtime.cjs"
|
|
18
|
+
},
|
|
19
|
+
"./types": {
|
|
20
|
+
"types": "./dist/types.d.ts"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"typesVersions": {
|
|
24
|
+
"*": {
|
|
25
|
+
".": [
|
|
26
|
+
"./dist/index.d.ts"
|
|
27
|
+
],
|
|
28
|
+
"runtime": [
|
|
29
|
+
"./dist/runtime.d.ts"
|
|
30
|
+
],
|
|
31
|
+
"types": [
|
|
32
|
+
"./dist/types.d.ts"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist"
|
|
38
|
+
],
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@rsbuild-image/core": "0.0.1-next.16",
|
|
41
|
+
"@rsbuild-image/react": "0.0.1-next.16",
|
|
42
|
+
"sharp": "^0.34.1",
|
|
43
|
+
"ipx": "^3.0.3"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"react": "^18.3.1",
|
|
47
|
+
"react-dom": "^18.3.1",
|
|
48
|
+
"@rslib/core": "^0.6.3",
|
|
49
|
+
"@types/node": "^16",
|
|
50
|
+
"typescript": "^5",
|
|
51
|
+
"@modern-js/app-tools": "0.0.0-next-20250416073604"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "rslib build",
|
|
55
|
+
"dev": "rslib build --watch"
|
|
56
|
+
}
|
|
57
|
+
}
|