@modern-js/sandpack-react 2.69.4 → 3.0.0-alpha.0
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/CHANGELOG.md +1 -47
- package/dist/cjs/index.js +87 -79
- package/dist/cjs/templates/common.js +34 -29
- package/dist/cjs/templates/index.js +52 -28
- package/dist/cjs/templates/mwa.js +42 -130
- package/dist/esm/index.mjs +60 -0
- package/dist/esm/templates/common.mjs +5 -0
- package/dist/esm/templates/index.mjs +21 -0
- package/dist/esm/templates/mwa.mjs +17 -0
- package/dist/esm-node/index.mjs +60 -0
- package/dist/esm-node/templates/common.mjs +5 -0
- package/dist/esm-node/templates/index.mjs +21 -0
- package/dist/esm-node/templates/mwa.mjs +17 -0
- package/dist/types/templates/common.d.ts +0 -3
- package/dist/types/templates/mwa.d.ts +4 -5
- package/package.json +28 -28
- package/rslib.config.mts +4 -0
- package/rstest.config.ts +5 -0
- package/scripts/template.ts +18 -47
- package/dist/esm/index.js +0 -64
- package/dist/esm/templates/common.js +0 -10
- package/dist/esm/templates/index.js +0 -7
- package/dist/esm/templates/mwa.js +0 -113
- package/dist/esm-node/index.js +0 -66
- package/dist/esm-node/templates/common.js +0 -10
- package/dist/esm-node/templates/index.js +0 -7
- package/dist/esm-node/templates/mwa.js +0 -115
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { OpenInCodeSandboxButton, SandpackCodeEditor, SandpackFileExplorer, SandpackLayout, SandpackProvider } from "@codesandbox/sandpack-react";
|
|
3
|
+
import { ModernTemplates } from "./templates";
|
|
4
|
+
function fileterFiles(files, removeFiles) {
|
|
5
|
+
if (0 === removeFiles.length) return files;
|
|
6
|
+
const result = {};
|
|
7
|
+
Object.keys(files).forEach((filename)=>{
|
|
8
|
+
if (!removeFiles.includes(filename)) result[filename] = files[filename];
|
|
9
|
+
});
|
|
10
|
+
return result;
|
|
11
|
+
}
|
|
12
|
+
function ModernSandpack(props) {
|
|
13
|
+
const { template, customSetup = {}, files: customFiles = {}, removeFiles = [], options = {}, initialCollapsedFolder = [], activeFile = 'src/routes/page.tsx', theme = 'light' } = props;
|
|
14
|
+
const initFiles = ModernTemplates[template];
|
|
15
|
+
const files = {
|
|
16
|
+
...fileterFiles(initFiles, removeFiles),
|
|
17
|
+
...fileterFiles(customFiles, removeFiles)
|
|
18
|
+
};
|
|
19
|
+
return /*#__PURE__*/ jsx(SandpackProvider, {
|
|
20
|
+
theme: theme,
|
|
21
|
+
customSetup: {
|
|
22
|
+
environment: 'node',
|
|
23
|
+
...customSetup
|
|
24
|
+
},
|
|
25
|
+
files: files,
|
|
26
|
+
options: {
|
|
27
|
+
activeFile,
|
|
28
|
+
visibleFiles: Object.keys(customFiles).filter((file)=>!removeFiles.includes(file)),
|
|
29
|
+
...options
|
|
30
|
+
},
|
|
31
|
+
children: /*#__PURE__*/ jsxs(SandpackLayout, {
|
|
32
|
+
children: [
|
|
33
|
+
/*#__PURE__*/ jsx(SandpackFileExplorer, {
|
|
34
|
+
autoHiddenFiles: true,
|
|
35
|
+
initialCollapsedFolder: [
|
|
36
|
+
'/.husky/',
|
|
37
|
+
'/.vscode/',
|
|
38
|
+
'/.codesandbox/',
|
|
39
|
+
...initialCollapsedFolder
|
|
40
|
+
]
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ jsx(SandpackCodeEditor, {
|
|
43
|
+
showLineNumbers: true,
|
|
44
|
+
showInlineErrors: true,
|
|
45
|
+
readOnly: true,
|
|
46
|
+
showTabs: false
|
|
47
|
+
}),
|
|
48
|
+
/*#__PURE__*/ jsx("div", {
|
|
49
|
+
style: {
|
|
50
|
+
position: 'absolute',
|
|
51
|
+
right: '5px',
|
|
52
|
+
bottom: '5px'
|
|
53
|
+
},
|
|
54
|
+
children: /*#__PURE__*/ jsx(OpenInCodeSandboxButton, {})
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
export { ModernSandpack as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const commonFiles = {
|
|
2
|
+
".codesandbox/environment.json": "{\n \"nodeVersion\": 18\n}\n",
|
|
3
|
+
".codesandbox/tasks.json": "{\n \"$schema\": \"https://codesandbox.io/schemas/tasks.json\",\n \"setupTasks\": [\n {\n \"name\": \"Installing Dependencies\",\n \"command\": \"pnpm install\"\n }\n ],\n \"tasks\": {\n \"start\": {\n \"name\": \"Application\",\n \"command\": \"pnpm run start\",\n \"runAtStart\": true,\n \"restartOn\": {\n \"files\": [\"pnpm-lock.yaml\"]\n }\n }\n }\n}\n"
|
|
4
|
+
};
|
|
5
|
+
export { commonFiles };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as __rspack_external__mwa_fa12d360 from "./mwa";
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"./mwa" (module) {
|
|
4
|
+
module.exports = __rspack_external__mwa_fa12d360;
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
var __webpack_module_cache__ = {};
|
|
8
|
+
function __webpack_require__(moduleId) {
|
|
9
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
10
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
11
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
12
|
+
exports: {}
|
|
13
|
+
};
|
|
14
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
15
|
+
return module.exports;
|
|
16
|
+
}
|
|
17
|
+
const { MWAFiles } = __webpack_require__("./mwa");
|
|
18
|
+
const ModernTemplates = {
|
|
19
|
+
'web-app': MWAFiles
|
|
20
|
+
};
|
|
21
|
+
export { ModernTemplates };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { commonFiles } from "./common";
|
|
2
|
+
const MWAFiles = {
|
|
3
|
+
...commonFiles,
|
|
4
|
+
".browserslistrc": "chrome >= 51\nedge >= 15\nfirefox >= 54\nsafari >= 10\nios_saf >= 10\n",
|
|
5
|
+
".gitignore": ".DS_Store\n\n.pnp\n.pnp.js\n.env.local\n.env.*.local\n.history\n*.log*\n\nnode_modules/\n.yarn-integrity\n.pnpm-store/\n*.tsbuildinfo\n.changeset/pre.json\n\ndist/\ncoverage/\nrelease/\noutput/\noutput_resource/\nlog/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\n**/*/typings/auto-generated\n\nmodern.config.local.*\n",
|
|
6
|
+
".npmrc": "strict-peer-dependencies=false\n",
|
|
7
|
+
"biome.json": '{\n "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",\n "vcs": {\n "enabled": true,\n "defaultBranch": "main",\n "clientKind": "git",\n "useIgnoreFile": true\n },\n "formatter": {\n "enabled": true,\n "indentStyle": "space"\n },\n "javascript": {\n "formatter": {\n "quoteStyle": "single",\n "arrowParentheses": "asNeeded",\n "jsxQuoteStyle": "double",\n "lineWidth": 80\n }\n },\n "linter": {\n "enabled": true,\n "rules": {\n "recommended": true,\n "suspicious": {\n "noDuplicateFontNames": "off"\n }\n }\n },\n "organizeImports": {\n "enabled": true\n },\n "files": {\n "ignoreUnknown": true,\n "ignore": [".vscode/**/*", "node_modules/**/*", "dist/**/*"]\n }\n}\n',
|
|
8
|
+
"modern.config.ts": "import { appTools, defineConfig } from '@modern-js/app-tools';\n\n// https://modernjs.dev/en/configure/app/usage\nexport default defineConfig({\n plugins: [appTools()],\n});\n",
|
|
9
|
+
"package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "serve": "modern serve",\n "lint": "biome check",\n "prepare": "simple-git-hooks"\n },\n "engines": {\n "node": ">=20"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "biome check --files-ignore-unknown=true"\n ]\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "dependencies": {\n "@modern-js/runtime": "3.0.0-alpha.0",\n "react": "^19.2.3",\n "react-dom": "^19.2.0"\n },\n "devDependencies": {\n "@modern-js/app-tools": "3.0.0-alpha.0",\n "@modern-js/tsconfig": "3.0.0-alpha.0",\n "@biomejs/biome": "1.9.4",\n "typescript": "~5.7.3",\n "@types/node": "^20",\n "@types/react": "^19.1.8",\n "@types/react-dom": "^19.1.6",\n "lint-staged": "~15.4.0",\n "simple-git-hooks": "^2.11.1",\n "rimraf": "^6.0.1"\n }\n}\n',
|
|
10
|
+
"tsconfig.json": "{\n \"extends\": \"@modern-js/tsconfig/base\",\n \"compilerOptions\": {\n \"declaration\": false,\n \"jsx\": \"preserve\",\n \"baseUrl\": \"./\",\n \"paths\": {\n \"@/*\": [\"./src/*\"],\n \"@shared/*\": [\"./shared/*\"]\n }\n },\n \"include\": [\"src\", \"shared\", \"config\", \"modern.config.ts\"],\n \"exclude\": [\"**/node_modules\"]\n}\n",
|
|
11
|
+
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n",
|
|
12
|
+
"src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\n\nexport default defineRuntimeConfig({});\n",
|
|
13
|
+
"src/routes/index.css": "html,\nbody {\n padding: 0;\n margin: 0;\n font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;\n background: linear-gradient(to bottom, transparent, #fff) #eceeef;\n}\n\np {\n margin: 0;\n}\n\n* {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-sizing: border-box;\n}\n\n.container-box {\n min-height: 100vh;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding-top: 10px;\n}\n\nmain {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.title {\n display: flex;\n margin: 4rem 0 4rem;\n align-items: center;\n font-size: 4rem;\n font-weight: 600;\n}\n\n.logo {\n width: 6rem;\n margin: 7px 0 0 1rem;\n}\n\n.name {\n color: #4ecaff;\n}\n\n.description {\n text-align: center;\n line-height: 1.5;\n font-size: 1.3rem;\n color: #1b3a42;\n margin-bottom: 5rem;\n}\n\n.code {\n background: #fafafa;\n border-radius: 12px;\n padding: 0.6rem 0.9rem;\n font-size: 1.05rem;\n font-family:\n Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,\n Bitstream Vera Sans Mono, Courier New, monospace;\n}\n\n.container-box .grid {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1100px;\n margin-top: 3rem;\n}\n\n.card {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100px;\n color: inherit;\n text-decoration: none;\n transition: 0.15s ease;\n width: 45%;\n}\n\n.card:hover,\n.card:focus {\n transform: scale(1.05);\n}\n\n.card h2 {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n margin: 0;\n padding: 0;\n}\n\n.card p {\n opacity: 0.6;\n font-size: 0.9rem;\n line-height: 1.5;\n margin-top: 1rem;\n}\n\n.arrow-right {\n width: 1.3rem;\n margin-left: 0.5rem;\n margin-top: 3px;\n}\n",
|
|
14
|
+
"src/routes/layout.tsx": "import { Outlet } from '@modern-js/runtime/router';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n",
|
|
15
|
+
"src/routes/page.tsx": 'import { Helmet } from \'@modern-js/runtime/head\';\nimport \'./index.css\';\n\nconst Index = () => (\n <div className="container-box">\n <Helmet>\n <link\n rel="icon"\n type="image/x-icon"\n href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"\n />\n </Helmet>\n <main>\n <div className="title">\n Welcome to\n <img\n className="logo"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"\n alt="Modern.js Logo"\n />\n <p className="name">Modern.js</p>\n </div>\n <p className="description">\n Get started by editing <code className="code">src/routes/page.tsx</code>\n </p>\n <div className="grid">\n <a\n href="https://modernjs.dev/guides/get-started/introduction.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n Guide\n <img\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n alt="Guide"\n />\n </h2>\n <p>Follow the guides to use all features of Modern.js.</p>\n </a>\n <a\n href="https://modernjs.dev/tutorials/foundations/introduction.html"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n Tutorials\n <img\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n alt="Tutorials"\n />\n </h2>\n <p>Learn to use Modern.js to create your first application.</p>\n </a>\n <a\n href="https://modernjs.dev/configure/app/usage.html"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n Config\n <img\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n alt="Config"\n />\n </h2>\n <p>Find all configuration options provided by Modern.js.</p>\n </a>\n <a\n href="https://github.com/web-infra-dev/modern.js"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n GitHub\n <img\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n alt="Github"\n />\n </h2>\n <p>View the source code on GitHub; feel free to contribute.</p>\n </a>\n </div>\n </main>\n </div>\n);\n\nexport default Index;\n'
|
|
16
|
+
};
|
|
17
|
+
export { MWAFiles };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { OpenInCodeSandboxButton, SandpackCodeEditor, SandpackFileExplorer, SandpackLayout, SandpackProvider } from "@codesandbox/sandpack-react";
|
|
3
|
+
import { ModernTemplates } from "./templates/index.mjs";
|
|
4
|
+
function fileterFiles(files, removeFiles) {
|
|
5
|
+
if (0 === removeFiles.length) return files;
|
|
6
|
+
const result = {};
|
|
7
|
+
Object.keys(files).forEach((filename)=>{
|
|
8
|
+
if (!removeFiles.includes(filename)) result[filename] = files[filename];
|
|
9
|
+
});
|
|
10
|
+
return result;
|
|
11
|
+
}
|
|
12
|
+
function ModernSandpack(props) {
|
|
13
|
+
const { template, customSetup = {}, files: customFiles = {}, removeFiles = [], options = {}, initialCollapsedFolder = [], activeFile = 'src/routes/page.tsx', theme = 'light' } = props;
|
|
14
|
+
const initFiles = ModernTemplates[template];
|
|
15
|
+
const files = {
|
|
16
|
+
...fileterFiles(initFiles, removeFiles),
|
|
17
|
+
...fileterFiles(customFiles, removeFiles)
|
|
18
|
+
};
|
|
19
|
+
return /*#__PURE__*/ jsx(SandpackProvider, {
|
|
20
|
+
theme: theme,
|
|
21
|
+
customSetup: {
|
|
22
|
+
environment: 'node',
|
|
23
|
+
...customSetup
|
|
24
|
+
},
|
|
25
|
+
files: files,
|
|
26
|
+
options: {
|
|
27
|
+
activeFile,
|
|
28
|
+
visibleFiles: Object.keys(customFiles).filter((file)=>!removeFiles.includes(file)),
|
|
29
|
+
...options
|
|
30
|
+
},
|
|
31
|
+
children: /*#__PURE__*/ jsxs(SandpackLayout, {
|
|
32
|
+
children: [
|
|
33
|
+
/*#__PURE__*/ jsx(SandpackFileExplorer, {
|
|
34
|
+
autoHiddenFiles: true,
|
|
35
|
+
initialCollapsedFolder: [
|
|
36
|
+
'/.husky/',
|
|
37
|
+
'/.vscode/',
|
|
38
|
+
'/.codesandbox/',
|
|
39
|
+
...initialCollapsedFolder
|
|
40
|
+
]
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ jsx(SandpackCodeEditor, {
|
|
43
|
+
showLineNumbers: true,
|
|
44
|
+
showInlineErrors: true,
|
|
45
|
+
readOnly: true,
|
|
46
|
+
showTabs: false
|
|
47
|
+
}),
|
|
48
|
+
/*#__PURE__*/ jsx("div", {
|
|
49
|
+
style: {
|
|
50
|
+
position: 'absolute',
|
|
51
|
+
right: '5px',
|
|
52
|
+
bottom: '5px'
|
|
53
|
+
},
|
|
54
|
+
children: /*#__PURE__*/ jsx(OpenInCodeSandboxButton, {})
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
export { ModernSandpack as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const commonFiles = {
|
|
2
|
+
".codesandbox/environment.json": "{\n \"nodeVersion\": 18\n}\n",
|
|
3
|
+
".codesandbox/tasks.json": "{\n \"$schema\": \"https://codesandbox.io/schemas/tasks.json\",\n \"setupTasks\": [\n {\n \"name\": \"Installing Dependencies\",\n \"command\": \"pnpm install\"\n }\n ],\n \"tasks\": {\n \"start\": {\n \"name\": \"Application\",\n \"command\": \"pnpm run start\",\n \"runAtStart\": true,\n \"restartOn\": {\n \"files\": [\"pnpm-lock.yaml\"]\n }\n }\n }\n}\n"
|
|
4
|
+
};
|
|
5
|
+
export { commonFiles };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as __rspack_external__mwa_mjs_5d9bbc8d from "./mwa.mjs";
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"./mwa" (module) {
|
|
4
|
+
module.exports = __rspack_external__mwa_mjs_5d9bbc8d;
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
var __webpack_module_cache__ = {};
|
|
8
|
+
function __webpack_require__(moduleId) {
|
|
9
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
10
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
11
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
12
|
+
exports: {}
|
|
13
|
+
};
|
|
14
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
15
|
+
return module.exports;
|
|
16
|
+
}
|
|
17
|
+
const { MWAFiles } = __webpack_require__("./mwa");
|
|
18
|
+
const ModernTemplates = {
|
|
19
|
+
'web-app': MWAFiles
|
|
20
|
+
};
|
|
21
|
+
export { ModernTemplates };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { commonFiles } from "./common.mjs";
|
|
2
|
+
const MWAFiles = {
|
|
3
|
+
...commonFiles,
|
|
4
|
+
".browserslistrc": "chrome >= 51\nedge >= 15\nfirefox >= 54\nsafari >= 10\nios_saf >= 10\n",
|
|
5
|
+
".gitignore": ".DS_Store\n\n.pnp\n.pnp.js\n.env.local\n.env.*.local\n.history\n*.log*\n\nnode_modules/\n.yarn-integrity\n.pnpm-store/\n*.tsbuildinfo\n.changeset/pre.json\n\ndist/\ncoverage/\nrelease/\noutput/\noutput_resource/\nlog/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\n**/*/typings/auto-generated\n\nmodern.config.local.*\n",
|
|
6
|
+
".npmrc": "strict-peer-dependencies=false\n",
|
|
7
|
+
"biome.json": '{\n "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",\n "vcs": {\n "enabled": true,\n "defaultBranch": "main",\n "clientKind": "git",\n "useIgnoreFile": true\n },\n "formatter": {\n "enabled": true,\n "indentStyle": "space"\n },\n "javascript": {\n "formatter": {\n "quoteStyle": "single",\n "arrowParentheses": "asNeeded",\n "jsxQuoteStyle": "double",\n "lineWidth": 80\n }\n },\n "linter": {\n "enabled": true,\n "rules": {\n "recommended": true,\n "suspicious": {\n "noDuplicateFontNames": "off"\n }\n }\n },\n "organizeImports": {\n "enabled": true\n },\n "files": {\n "ignoreUnknown": true,\n "ignore": [".vscode/**/*", "node_modules/**/*", "dist/**/*"]\n }\n}\n',
|
|
8
|
+
"modern.config.ts": "import { appTools, defineConfig } from '@modern-js/app-tools';\n\n// https://modernjs.dev/en/configure/app/usage\nexport default defineConfig({\n plugins: [appTools()],\n});\n",
|
|
9
|
+
"package.json": '{\n "name": "modern-app",\n "version": "0.1.0",\n "scripts": {\n "reset": "npx rimraf node_modules ./**/node_modules",\n "dev": "modern dev",\n "build": "modern build",\n "serve": "modern serve",\n "lint": "biome check",\n "prepare": "simple-git-hooks"\n },\n "engines": {\n "node": ">=20"\n },\n "lint-staged": {\n "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [\n "biome check --files-ignore-unknown=true"\n ]\n },\n "simple-git-hooks": {\n "pre-commit": "npx lint-staged"\n },\n "dependencies": {\n "@modern-js/runtime": "3.0.0-alpha.0",\n "react": "^19.2.3",\n "react-dom": "^19.2.0"\n },\n "devDependencies": {\n "@modern-js/app-tools": "3.0.0-alpha.0",\n "@modern-js/tsconfig": "3.0.0-alpha.0",\n "@biomejs/biome": "1.9.4",\n "typescript": "~5.7.3",\n "@types/node": "^20",\n "@types/react": "^19.1.8",\n "@types/react-dom": "^19.1.6",\n "lint-staged": "~15.4.0",\n "simple-git-hooks": "^2.11.1",\n "rimraf": "^6.0.1"\n }\n}\n',
|
|
10
|
+
"tsconfig.json": "{\n \"extends\": \"@modern-js/tsconfig/base\",\n \"compilerOptions\": {\n \"declaration\": false,\n \"jsx\": \"preserve\",\n \"baseUrl\": \"./\",\n \"paths\": {\n \"@/*\": [\"./src/*\"],\n \"@shared/*\": [\"./shared/*\"]\n }\n },\n \"include\": [\"src\", \"shared\", \"config\", \"modern.config.ts\"],\n \"exclude\": [\"**/node_modules\"]\n}\n",
|
|
11
|
+
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n",
|
|
12
|
+
"src/modern.runtime.ts": "import { defineRuntimeConfig } from '@modern-js/runtime';\n\nexport default defineRuntimeConfig({});\n",
|
|
13
|
+
"src/routes/index.css": "html,\nbody {\n padding: 0;\n margin: 0;\n font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;\n background: linear-gradient(to bottom, transparent, #fff) #eceeef;\n}\n\np {\n margin: 0;\n}\n\n* {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-sizing: border-box;\n}\n\n.container-box {\n min-height: 100vh;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding-top: 10px;\n}\n\nmain {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.title {\n display: flex;\n margin: 4rem 0 4rem;\n align-items: center;\n font-size: 4rem;\n font-weight: 600;\n}\n\n.logo {\n width: 6rem;\n margin: 7px 0 0 1rem;\n}\n\n.name {\n color: #4ecaff;\n}\n\n.description {\n text-align: center;\n line-height: 1.5;\n font-size: 1.3rem;\n color: #1b3a42;\n margin-bottom: 5rem;\n}\n\n.code {\n background: #fafafa;\n border-radius: 12px;\n padding: 0.6rem 0.9rem;\n font-size: 1.05rem;\n font-family:\n Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,\n Bitstream Vera Sans Mono, Courier New, monospace;\n}\n\n.container-box .grid {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1100px;\n margin-top: 3rem;\n}\n\n.card {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100px;\n color: inherit;\n text-decoration: none;\n transition: 0.15s ease;\n width: 45%;\n}\n\n.card:hover,\n.card:focus {\n transform: scale(1.05);\n}\n\n.card h2 {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n margin: 0;\n padding: 0;\n}\n\n.card p {\n opacity: 0.6;\n font-size: 0.9rem;\n line-height: 1.5;\n margin-top: 1rem;\n}\n\n.arrow-right {\n width: 1.3rem;\n margin-left: 0.5rem;\n margin-top: 3px;\n}\n",
|
|
14
|
+
"src/routes/layout.tsx": "import { Outlet } from '@modern-js/runtime/router';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n",
|
|
15
|
+
"src/routes/page.tsx": 'import { Helmet } from \'@modern-js/runtime/head\';\nimport \'./index.css\';\n\nconst Index = () => (\n <div className="container-box">\n <Helmet>\n <link\n rel="icon"\n type="image/x-icon"\n href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"\n />\n </Helmet>\n <main>\n <div className="title">\n Welcome to\n <img\n className="logo"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"\n alt="Modern.js Logo"\n />\n <p className="name">Modern.js</p>\n </div>\n <p className="description">\n Get started by editing <code className="code">src/routes/page.tsx</code>\n </p>\n <div className="grid">\n <a\n href="https://modernjs.dev/guides/get-started/introduction.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n Guide\n <img\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n alt="Guide"\n />\n </h2>\n <p>Follow the guides to use all features of Modern.js.</p>\n </a>\n <a\n href="https://modernjs.dev/tutorials/foundations/introduction.html"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n Tutorials\n <img\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n alt="Tutorials"\n />\n </h2>\n <p>Learn to use Modern.js to create your first application.</p>\n </a>\n <a\n href="https://modernjs.dev/configure/app/usage.html"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n Config\n <img\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n alt="Config"\n />\n </h2>\n <p>Find all configuration options provided by Modern.js.</p>\n </a>\n <a\n href="https://github.com/web-infra-dev/modern.js"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n GitHub\n <img\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n alt="Github"\n />\n </h2>\n <p>View the source code on GitHub; feel free to contribute.</p>\n </a>\n </div>\n </main>\n </div>\n);\n\nexport default Index;\n'
|
|
16
|
+
};
|
|
17
|
+
export { MWAFiles };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare const MWAFiles: {
|
|
2
|
-
"README.md": string;
|
|
3
2
|
".browserslistrc": string;
|
|
4
|
-
"
|
|
3
|
+
".gitignore": string;
|
|
4
|
+
".npmrc": string;
|
|
5
|
+
"biome.json": string;
|
|
5
6
|
"modern.config.ts": string;
|
|
7
|
+
"package.json": string;
|
|
6
8
|
"tsconfig.json": string;
|
|
7
9
|
"src/modern-app-env.d.ts": string;
|
|
8
10
|
"src/modern.runtime.ts": string;
|
|
@@ -11,7 +13,4 @@ export declare const MWAFiles: {
|
|
|
11
13
|
"src/routes/page.tsx": string;
|
|
12
14
|
".codesandbox/environment.json": string;
|
|
13
15
|
".codesandbox/tasks.json": string;
|
|
14
|
-
".gitignore": string;
|
|
15
|
-
"biome.json": string;
|
|
16
|
-
".npmrc": string;
|
|
17
16
|
};
|
package/package.json
CHANGED
|
@@ -15,49 +15,49 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "
|
|
18
|
+
"version": "3.0.0-alpha.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
22
|
-
"module": "./dist/esm/index.
|
|
22
|
+
"module": "./dist/esm/index.mjs",
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
|
+
"types": "./dist/types/index.d.ts",
|
|
26
|
+
"jsnext:source": "./src/index.ts",
|
|
25
27
|
"node": {
|
|
26
|
-
"
|
|
27
|
-
"import": "./dist/esm-node/index.js",
|
|
28
|
+
"import": "./dist/esm-node/index.mjs",
|
|
28
29
|
"require": "./dist/cjs/index.js"
|
|
29
30
|
},
|
|
30
|
-
"default":
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
"default": "./dist/esm/index.mjs"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"typesVersions": {
|
|
35
|
+
"*": {
|
|
36
|
+
".": [
|
|
37
|
+
"./dist/types/index.d.ts"
|
|
38
|
+
]
|
|
34
39
|
}
|
|
35
40
|
},
|
|
36
41
|
"dependencies": {
|
|
37
|
-
"@codesandbox/sandpack-react": "^2.
|
|
42
|
+
"@codesandbox/sandpack-react": "^2.20.0",
|
|
38
43
|
"@swc/helpers": "^0.5.17",
|
|
39
|
-
"react": "^
|
|
40
|
-
"react-dom": "^
|
|
44
|
+
"react": "^19.2.3",
|
|
45
|
+
"react-dom": "^19.2.3"
|
|
41
46
|
},
|
|
42
47
|
"devDependencies": {
|
|
43
48
|
"@modern-js/codesmith-api-handlebars": "2.6.8",
|
|
44
49
|
"@modern-js/codesmith-utils": "2.6.8",
|
|
45
|
-
"@
|
|
46
|
-
"@types/node": "^
|
|
47
|
-
"@types/react": "^
|
|
48
|
-
"@types/react-dom": "^
|
|
49
|
-
"@types/recursive-readdir": "^2.2.
|
|
50
|
-
"jest": "^29",
|
|
50
|
+
"@rslib/core": "0.18.5",
|
|
51
|
+
"@types/node": "^20",
|
|
52
|
+
"@types/react": "^19.2.7",
|
|
53
|
+
"@types/react-dom": "^19.2.3",
|
|
54
|
+
"@types/recursive-readdir": "^2.2.4",
|
|
51
55
|
"recursive-readdir": "^2.2.3",
|
|
52
|
-
"ts-node": "^10.9.
|
|
56
|
+
"ts-node": "^10.9.2",
|
|
53
57
|
"typescript": "^5",
|
|
54
|
-
"@
|
|
55
|
-
"@modern-js/
|
|
56
|
-
"@modern-js/
|
|
57
|
-
"@modern-js/generator-utils": "3.7.62",
|
|
58
|
-
"@modern-js/mwa-generator": "3.7.62",
|
|
59
|
-
"@scripts/build": "2.66.0",
|
|
60
|
-
"@scripts/jest-config": "2.66.0"
|
|
58
|
+
"@scripts/jest-config": "2.66.0",
|
|
59
|
+
"@modern-js/create": "3.0.0-alpha.0",
|
|
60
|
+
"@modern-js/rslib": "2.68.10"
|
|
61
61
|
},
|
|
62
62
|
"sideEffects": false,
|
|
63
63
|
"publishConfig": {
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"test": "
|
|
68
|
+
"build": "ts-node scripts/template.ts && rslib build",
|
|
69
|
+
"dev": "rslib build --watch",
|
|
70
|
+
"test": "rstest --passWithNoTests"
|
|
71
71
|
}
|
|
72
72
|
}
|
package/rslib.config.mts
ADDED
package/rstest.config.ts
ADDED
package/scripts/template.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import { renderString } from '@modern-js/codesmith-api-handlebars';
|
|
3
3
|
import { fs } from '@modern-js/codesmith-utils/fs-extra';
|
|
4
|
-
import { Solution } from '@modern-js/generator-common';
|
|
5
|
-
import { getModernVersion } from '@modern-js/generator-utils';
|
|
6
4
|
import recursive from 'recursive-readdir';
|
|
7
5
|
|
|
8
6
|
const IgnoreFiles = [
|
|
@@ -54,65 +52,38 @@ async function handleCodesandboxTemplate() {
|
|
|
54
52
|
|
|
55
53
|
return files;
|
|
56
54
|
}
|
|
57
|
-
async function handleBaseTemplate() {
|
|
58
|
-
const templateDir = path.join(
|
|
59
|
-
require.resolve('@modern-js/base-generator'),
|
|
60
|
-
'../../',
|
|
61
|
-
'templates',
|
|
62
|
-
);
|
|
63
|
-
const baseTemplate = path.join(templateDir, 'base-template');
|
|
64
|
-
const pnpmTemplate = path.join(templateDir, 'pnpm-template');
|
|
65
|
-
const files: Record<string, string> = {
|
|
66
|
-
...(await handleTemplate(baseTemplate)),
|
|
67
|
-
...(await handleTemplate(pnpmTemplate)),
|
|
68
|
-
};
|
|
69
55
|
|
|
70
|
-
|
|
71
|
-
|
|
56
|
+
async function handleCreateTemplate() {
|
|
57
|
+
const createPackageMainPath = require.resolve('@modern-js/create');
|
|
58
|
+
const createPackagePath = path.dirname(path.dirname(createPackageMainPath));
|
|
59
|
+
const createPackageJsonPath = path.join(createPackagePath, 'package.json');
|
|
72
60
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
'
|
|
77
|
-
'templates',
|
|
78
|
-
);
|
|
79
|
-
const entryTemplateDir = path.join(
|
|
80
|
-
require.resolve('@modern-js/entry-generator'),
|
|
81
|
-
'../../',
|
|
82
|
-
'templates',
|
|
61
|
+
const templateDir = path.join(createPackagePath, 'template');
|
|
62
|
+
|
|
63
|
+
const createPackageJson = JSON.parse(
|
|
64
|
+
fs.readFileSync(createPackageJsonPath, 'utf-8'),
|
|
83
65
|
);
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
modernVersion,
|
|
92
|
-
isTs: true,
|
|
93
|
-
packageManager: 'pnpm',
|
|
94
|
-
})),
|
|
95
|
-
...(await handleTemplate(tsTemplate)),
|
|
96
|
-
...(await handleTemplate(
|
|
97
|
-
entryTemplateDir,
|
|
98
|
-
{},
|
|
99
|
-
{ fileExtra: '.tsx', routerPrefix: 'src/' },
|
|
100
|
-
)),
|
|
101
|
-
};
|
|
66
|
+
const version = createPackageJson.version || '3.0.0';
|
|
67
|
+
|
|
68
|
+
const files = await handleTemplate(templateDir, {
|
|
69
|
+
packageName: 'modern-app',
|
|
70
|
+
version,
|
|
71
|
+
});
|
|
72
|
+
|
|
102
73
|
return files;
|
|
103
74
|
}
|
|
104
75
|
|
|
105
76
|
async function main() {
|
|
106
77
|
const codesandboxFiles = await handleCodesandboxTemplate();
|
|
107
|
-
const
|
|
78
|
+
const createFiles = await handleCreateTemplate();
|
|
108
79
|
const srcTemplatesDir = path.join(__dirname, '..', 'src/templates');
|
|
109
|
-
const commonFiles = { ...codesandboxFiles
|
|
80
|
+
const commonFiles = { ...codesandboxFiles };
|
|
110
81
|
fs.writeFileSync(
|
|
111
82
|
path.join(srcTemplatesDir, 'common.ts'),
|
|
112
83
|
`export const commonFiles = ${JSON.stringify(commonFiles, null, 2)};`,
|
|
113
84
|
'utf-8',
|
|
114
85
|
);
|
|
115
|
-
const mwaFiles =
|
|
86
|
+
const mwaFiles = createFiles;
|
|
116
87
|
fs.writeFileSync(
|
|
117
88
|
path.join(srcTemplatesDir, 'mwa.ts'),
|
|
118
89
|
`import { commonFiles } from './common';
|
package/dist/esm/index.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
2
|
-
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
3
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { OpenInCodeSandboxButton, SandpackCodeEditor, SandpackFileExplorer, SandpackLayout, SandpackProvider } from "@codesandbox/sandpack-react";
|
|
5
|
-
import { ModernTemplates } from "./templates";
|
|
6
|
-
function fileterFiles(files, removeFiles) {
|
|
7
|
-
if (removeFiles.length === 0) {
|
|
8
|
-
return files;
|
|
9
|
-
}
|
|
10
|
-
var result = {};
|
|
11
|
-
Object.keys(files).forEach(function(filename) {
|
|
12
|
-
if (!removeFiles.includes(filename)) {
|
|
13
|
-
result[filename] = files[filename];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return result;
|
|
17
|
-
}
|
|
18
|
-
function ModernSandpack(props) {
|
|
19
|
-
var template = props.template, _props_customSetup = props.customSetup, customSetup = _props_customSetup === void 0 ? {} : _props_customSetup, tmp = props.files, customFiles = tmp === void 0 ? {} : tmp, _props_removeFiles = props.removeFiles, removeFiles = _props_removeFiles === void 0 ? [] : _props_removeFiles, _props_options = props.options, options = _props_options === void 0 ? {} : _props_options, _props_initialCollapsedFolder = props.initialCollapsedFolder, initialCollapsedFolder = _props_initialCollapsedFolder === void 0 ? [] : _props_initialCollapsedFolder, _props_activeFile = props.activeFile, activeFile = _props_activeFile === void 0 ? "src/routes/page.tsx" : _props_activeFile, _props_theme = props.theme, theme = _props_theme === void 0 ? "light" : _props_theme;
|
|
20
|
-
var initFiles = ModernTemplates[template];
|
|
21
|
-
var files = _object_spread({}, fileterFiles(initFiles, removeFiles), fileterFiles(customFiles, removeFiles));
|
|
22
|
-
return /* @__PURE__ */ _jsx(SandpackProvider, {
|
|
23
|
-
theme,
|
|
24
|
-
customSetup: _object_spread({
|
|
25
|
-
environment: "node"
|
|
26
|
-
}, customSetup),
|
|
27
|
-
files,
|
|
28
|
-
options: _object_spread({
|
|
29
|
-
activeFile,
|
|
30
|
-
visibleFiles: Object.keys(customFiles).filter(function(file) {
|
|
31
|
-
return !removeFiles.includes(file);
|
|
32
|
-
})
|
|
33
|
-
}, options),
|
|
34
|
-
children: /* @__PURE__ */ _jsxs(SandpackLayout, {
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ _jsx(SandpackFileExplorer, {
|
|
37
|
-
autoHiddenFiles: true,
|
|
38
|
-
initialCollapsedFolder: [
|
|
39
|
-
"/.husky/",
|
|
40
|
-
"/.vscode/",
|
|
41
|
-
"/.codesandbox/"
|
|
42
|
-
].concat(_to_consumable_array(initialCollapsedFolder))
|
|
43
|
-
}),
|
|
44
|
-
/* @__PURE__ */ _jsx(SandpackCodeEditor, {
|
|
45
|
-
showLineNumbers: true,
|
|
46
|
-
showInlineErrors: true,
|
|
47
|
-
readOnly: true,
|
|
48
|
-
showTabs: false
|
|
49
|
-
}),
|
|
50
|
-
/* @__PURE__ */ _jsx("div", {
|
|
51
|
-
style: {
|
|
52
|
-
position: "absolute",
|
|
53
|
-
right: "5px",
|
|
54
|
-
bottom: "5px"
|
|
55
|
-
},
|
|
56
|
-
children: /* @__PURE__ */ _jsx(OpenInCodeSandboxButton, {})
|
|
57
|
-
})
|
|
58
|
-
]
|
|
59
|
-
})
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
export {
|
|
63
|
-
ModernSandpack as default
|
|
64
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
var commonFiles = {
|
|
2
|
-
".codesandbox/environment.json": '{\n "nodeVersion": 18\n}\n',
|
|
3
|
-
".codesandbox/tasks.json": '{\n "$schema": "https://codesandbox.io/schemas/tasks.json",\n "setupTasks": [\n {\n "name": "Installing Dependencies",\n "command": "pnpm install"\n }\n ],\n "tasks": {\n "start": {\n "name": "Application",\n "command": "pnpm run start",\n "runAtStart": true,\n "restartOn": {\n "files": ["pnpm-lock.yaml"]\n }\n }\n }\n}\n',
|
|
4
|
-
".gitignore": ".DS_Store\n\n.pnp\n.pnp.js\n.env.local\n.env.*.local\n.history\n*.log*\n\nnode_modules/\n.yarn-integrity\n.pnpm-store/\n*.tsbuildinfo\n.changeset/pre.json\n\ndist/\ncoverage/\nrelease/\noutput/\noutput_resource/\nlog/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\n**/*/typings/auto-generated\n\nmodern.config.local.*\n",
|
|
5
|
-
"biome.json": '{\n "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",\n "vcs": {\n "enabled": true,\n "defaultBranch": "main",\n "clientKind": "git",\n "useIgnoreFile": true\n },\n "formatter": {\n "enabled": true,\n "indentStyle": "space"\n },\n "javascript": {\n "formatter": {\n "quoteStyle": "single",\n "arrowParentheses": "asNeeded",\n "jsxQuoteStyle": "double",\n "lineWidth": 80\n }\n },\n "linter": {\n "enabled": true,\n "rules": {\n "recommended": true,\n "suspicious": {\n "noDuplicateFontNames": "off"\n }\n }\n },\n "organizeImports": {\n "enabled": true\n },\n "files": {\n "ignoreUnknown": true,\n "ignore": [".vscode/**/*", "node_modules/**/*", "dist/**/*"]\n }\n}\n',
|
|
6
|
-
".npmrc": "strict-peer-dependencies=false\n"
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
commonFiles
|
|
10
|
-
};
|