@modern-js/sandpack-react 0.0.0-nightly-20231120170640 → 0.0.0-nightly-20231122170633
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 -1
- package/dist/cjs/templates/module.js +2 -2
- package/dist/cjs/templates/mwa.js +1 -1
- package/dist/esm/templates/module.js +2 -2
- package/dist/esm/templates/mwa.js +1 -1
- package/dist/esm-node/templates/module.js +2 -2
- package/dist/esm-node/templates/mwa.js +1 -1
- package/dist/types/templates/module.d.ts +1 -1
- package/dist/types/templates/mwa.d.ts +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -27,10 +27,10 @@ const ModuleFiles = {
|
|
|
27
27
|
...{
|
|
28
28
|
".npmignore": ".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*.tsbuildinfo\n.eslintcache\n\ncoverage/\nrelease/\noutput/\noutput_resource/\ntests/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\nsrc/\n\nmodern.config.*\njest.config.js\n.eslintrc.js\n.eslintrc\ntsconfig.json\nCHANGELOG.md\n\n**/*/api/typings/auto-generated\n",
|
|
29
29
|
"README.md": "# Modern.js Package\n\n## Setup\n\nInstall the dependencies:\n\n```bash\npnpm install\n```\n\n## Get Started\n\nRun and debug the module:\n\n```bash\npnpm dev\n```\n\nRun test cases:\n\n```bash\npnpm test\n```\n\nBuild the module for production:\n\n```bash\npnpm build\n```\n\nEnable optional features:\n\n```bash\npnpm new\n```\n\nOther commands:\n\n```bash\npnpm lint # Lint and fix source files\npnpm change # Add a new changeset\npnpm bump # Update version and changelog via changeset\npnpm release # Release the package\n```\n\nFor more information, see the [Modern.js Module documentation](https://modernjs.dev/module-tools/en).\n",
|
|
30
|
-
"package.json": '{\n "name": "modern-npm-module",\n "version": "0.1.0",\n "types": "./dist/types/index.d.ts",\n "main": "./dist/lib/index.js",\n "module": "./dist/es/index.js",\n "scripts": {\n "prepare": "modern build && husky install",\n "dev": "modern dev",\n "build": "modern build",\n "build:watch": "modern build -w",\n "reset": "rimraf ./**/node_modules",\n "lint": "modern lint",\n "change": "modern change",\n "bump": "modern bump",\n "pre": "modern pre",\n "change-status": "modern change-status",\n "gen-release-note": "modern gen-release-note",\n "release": "modern release",\n "new": "modern new",\n "upgrade": "modern upgrade"\n },\n "lint-staged": {\n "*.{js,jsx,ts,tsx,mjs,cjs}": [\n "node --max_old_space_size=8192 ./node_modules/eslint/bin/eslint.js --fix --color --cache --quiet"\n ]\n },\n "eslintIgnore": [\n "node_modules/",\n "dist/"\n ],\n "dependencies": {},\n "peerDependencies": {},\n "devDependencies": {\n "@modern-js/module-tools": "2.40.0",\n "@modern-js/eslint-config": "2.40.0",\n "typescript": "~5.0.4",\n "@types/
|
|
30
|
+
"package.json": '{\n "name": "modern-npm-module",\n "version": "0.1.0",\n "types": "./dist/types/index.d.ts",\n "main": "./dist/lib/index.js",\n "module": "./dist/es/index.js",\n "scripts": {\n "prepare": "modern build && husky install",\n "dev": "modern dev",\n "build": "modern build",\n "build:watch": "modern build -w",\n "reset": "rimraf ./**/node_modules",\n "lint": "modern lint",\n "change": "modern change",\n "bump": "modern bump",\n "pre": "modern pre",\n "change-status": "modern change-status",\n "gen-release-note": "modern gen-release-note",\n "release": "modern release",\n "new": "modern new",\n "upgrade": "modern upgrade"\n },\n "lint-staged": {\n "*.{js,jsx,ts,tsx,mjs,cjs}": [\n "node --max_old_space_size=8192 ./node_modules/eslint/bin/eslint.js --fix --color --cache --quiet"\n ]\n },\n "eslintIgnore": [\n "node_modules/",\n "dist/"\n ],\n "dependencies": {},\n "peerDependencies": {},\n "devDependencies": {\n "@modern-js/module-tools": "2.40.0",\n "@modern-js/eslint-config": "2.40.0",\n "typescript": "~5.0.4",\n "@types/node": "~16.11.7",\n "rimraf": "~3.0.2",\n "lint-staged": "~13.1.0",\n "prettier": "~2.8.1",\n "husky": "~8.0.1"\n },\n "sideEffects": [],\n "publishConfig": {\n "access": "public",\n "registry": "https://registry.npmjs.org/"\n }\n}\n',
|
|
31
31
|
"src/index.ts": "export default function () {\n return 'hello world';\n}\n",
|
|
32
|
-
"tsconfig.json": '{\n "compilerOptions": {\n "allowJs": true,\n "baseUrl": ".",\n "declaration": true,\n "emitDeclarationOnly": true,\n "esModuleInterop": true,\n "forceConsistentCasingInFileNames": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "lib": ["DOM", "ESNext"],\n "moduleResolution": "node",\n "paths": {\n "@/*": ["./src/*"]\n },\n "resolveJsonModule": true,\n "rootDir": "src",\n "skipLibCheck": true,\n "strict": true\n },\n "exclude": ["**/node_modules"],\n "include": ["src"]\n}\n',
|
|
33
32
|
"modern.config.ts": "import { moduleTools, defineConfig } from '@modern-js/module-tools';\n\nexport default defineConfig({\n plugins: [moduleTools()],\n buildPreset: 'npm-library',\n});\n",
|
|
33
|
+
"tsconfig.json": '{\n "compilerOptions": {\n "allowJs": true,\n "baseUrl": ".",\n "declaration": true,\n "emitDeclarationOnly": true,\n "esModuleInterop": true,\n "forceConsistentCasingInFileNames": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "lib": ["DOM", "ESNext"],\n "moduleResolution": "node",\n "paths": {\n "@/*": ["./src/*"]\n },\n "resolveJsonModule": true,\n "rootDir": "src",\n "skipLibCheck": true,\n "strict": true\n },\n "exclude": ["**/node_modules"],\n "include": ["src"]\n}\n',
|
|
34
34
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/module-tools/types' />\n/// <reference types='@modern-js/plugin-testing/types' />\n"
|
|
35
35
|
}
|
|
36
36
|
};
|
|
@@ -31,8 +31,8 @@ const MWAFiles = {
|
|
|
31
31
|
"modern.config.ts": "import { appTools, defineConfig } from '@modern-js/app-tools';\n\n// https://modernjs.dev/en/configure/app/usage\nexport default defineConfig({\n runtime: {\n router: true,\n },\n plugins: [appTools()],\n});\n",
|
|
32
32
|
"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',
|
|
33
33
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n/// <reference types='@modern-js/runtime/types' />\n/// <reference types='@modern-js/runtime/types/router' />\n",
|
|
34
|
-
"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",
|
|
35
34
|
"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: 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",
|
|
35
|
+
"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",
|
|
36
36
|
"src/routes/page.tsx": `import { Helmet } from '@modern-js/runtime/head';
|
|
37
37
|
import './index.css';
|
|
38
38
|
|
|
@@ -3,10 +3,10 @@ import { commonFiles } from "./common";
|
|
|
3
3
|
var ModuleFiles = _object_spread({}, commonFiles, {
|
|
4
4
|
".npmignore": ".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*.tsbuildinfo\n.eslintcache\n\ncoverage/\nrelease/\noutput/\noutput_resource/\ntests/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\nsrc/\n\nmodern.config.*\njest.config.js\n.eslintrc.js\n.eslintrc\ntsconfig.json\nCHANGELOG.md\n\n**/*/api/typings/auto-generated\n",
|
|
5
5
|
"README.md": "# Modern.js Package\n\n## Setup\n\nInstall the dependencies:\n\n```bash\npnpm install\n```\n\n## Get Started\n\nRun and debug the module:\n\n```bash\npnpm dev\n```\n\nRun test cases:\n\n```bash\npnpm test\n```\n\nBuild the module for production:\n\n```bash\npnpm build\n```\n\nEnable optional features:\n\n```bash\npnpm new\n```\n\nOther commands:\n\n```bash\npnpm lint # Lint and fix source files\npnpm change # Add a new changeset\npnpm bump # Update version and changelog via changeset\npnpm release # Release the package\n```\n\nFor more information, see the [Modern.js Module documentation](https://modernjs.dev/module-tools/en).\n",
|
|
6
|
-
"package.json": '{\n "name": "modern-npm-module",\n "version": "0.1.0",\n "types": "./dist/types/index.d.ts",\n "main": "./dist/lib/index.js",\n "module": "./dist/es/index.js",\n "scripts": {\n "prepare": "modern build && husky install",\n "dev": "modern dev",\n "build": "modern build",\n "build:watch": "modern build -w",\n "reset": "rimraf ./**/node_modules",\n "lint": "modern lint",\n "change": "modern change",\n "bump": "modern bump",\n "pre": "modern pre",\n "change-status": "modern change-status",\n "gen-release-note": "modern gen-release-note",\n "release": "modern release",\n "new": "modern new",\n "upgrade": "modern upgrade"\n },\n "lint-staged": {\n "*.{js,jsx,ts,tsx,mjs,cjs}": [\n "node --max_old_space_size=8192 ./node_modules/eslint/bin/eslint.js --fix --color --cache --quiet"\n ]\n },\n "eslintIgnore": [\n "node_modules/",\n "dist/"\n ],\n "dependencies": {},\n "peerDependencies": {},\n "devDependencies": {\n "@modern-js/module-tools": "2.40.0",\n "@modern-js/eslint-config": "2.40.0",\n "typescript": "~5.0.4",\n "@types/
|
|
6
|
+
"package.json": '{\n "name": "modern-npm-module",\n "version": "0.1.0",\n "types": "./dist/types/index.d.ts",\n "main": "./dist/lib/index.js",\n "module": "./dist/es/index.js",\n "scripts": {\n "prepare": "modern build && husky install",\n "dev": "modern dev",\n "build": "modern build",\n "build:watch": "modern build -w",\n "reset": "rimraf ./**/node_modules",\n "lint": "modern lint",\n "change": "modern change",\n "bump": "modern bump",\n "pre": "modern pre",\n "change-status": "modern change-status",\n "gen-release-note": "modern gen-release-note",\n "release": "modern release",\n "new": "modern new",\n "upgrade": "modern upgrade"\n },\n "lint-staged": {\n "*.{js,jsx,ts,tsx,mjs,cjs}": [\n "node --max_old_space_size=8192 ./node_modules/eslint/bin/eslint.js --fix --color --cache --quiet"\n ]\n },\n "eslintIgnore": [\n "node_modules/",\n "dist/"\n ],\n "dependencies": {},\n "peerDependencies": {},\n "devDependencies": {\n "@modern-js/module-tools": "2.40.0",\n "@modern-js/eslint-config": "2.40.0",\n "typescript": "~5.0.4",\n "@types/node": "~16.11.7",\n "rimraf": "~3.0.2",\n "lint-staged": "~13.1.0",\n "prettier": "~2.8.1",\n "husky": "~8.0.1"\n },\n "sideEffects": [],\n "publishConfig": {\n "access": "public",\n "registry": "https://registry.npmjs.org/"\n }\n}\n',
|
|
7
7
|
"src/index.ts": "export default function () {\n return 'hello world';\n}\n",
|
|
8
|
-
"tsconfig.json": '{\n "compilerOptions": {\n "allowJs": true,\n "baseUrl": ".",\n "declaration": true,\n "emitDeclarationOnly": true,\n "esModuleInterop": true,\n "forceConsistentCasingInFileNames": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "lib": ["DOM", "ESNext"],\n "moduleResolution": "node",\n "paths": {\n "@/*": ["./src/*"]\n },\n "resolveJsonModule": true,\n "rootDir": "src",\n "skipLibCheck": true,\n "strict": true\n },\n "exclude": ["**/node_modules"],\n "include": ["src"]\n}\n',
|
|
9
8
|
"modern.config.ts": "import { moduleTools, defineConfig } from '@modern-js/module-tools';\n\nexport default defineConfig({\n plugins: [moduleTools()],\n buildPreset: 'npm-library',\n});\n",
|
|
9
|
+
"tsconfig.json": '{\n "compilerOptions": {\n "allowJs": true,\n "baseUrl": ".",\n "declaration": true,\n "emitDeclarationOnly": true,\n "esModuleInterop": true,\n "forceConsistentCasingInFileNames": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "lib": ["DOM", "ESNext"],\n "moduleResolution": "node",\n "paths": {\n "@/*": ["./src/*"]\n },\n "resolveJsonModule": true,\n "rootDir": "src",\n "skipLibCheck": true,\n "strict": true\n },\n "exclude": ["**/node_modules"],\n "include": ["src"]\n}\n',
|
|
10
10
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/module-tools/types' />\n/// <reference types='@modern-js/plugin-testing/types' />\n"
|
|
11
11
|
});
|
|
12
12
|
export {
|
|
@@ -7,8 +7,8 @@ var MWAFiles = _object_spread({}, commonFiles, {
|
|
|
7
7
|
"modern.config.ts": "import { appTools, defineConfig } from '@modern-js/app-tools';\n\n// https://modernjs.dev/en/configure/app/usage\nexport default defineConfig({\n runtime: {\n router: true,\n },\n plugins: [appTools()],\n});\n",
|
|
8
8
|
"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',
|
|
9
9
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n/// <reference types='@modern-js/runtime/types' />\n/// <reference types='@modern-js/runtime/types/router' />\n",
|
|
10
|
-
"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",
|
|
11
10
|
"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: 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",
|
|
11
|
+
"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",
|
|
12
12
|
"src/routes/page.tsx": `import { Helmet } from '@modern-js/runtime/head';
|
|
13
13
|
import './index.css';
|
|
14
14
|
|
|
@@ -4,10 +4,10 @@ const ModuleFiles = {
|
|
|
4
4
|
...{
|
|
5
5
|
".npmignore": ".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*.tsbuildinfo\n.eslintcache\n\ncoverage/\nrelease/\noutput/\noutput_resource/\ntests/\n\n.vscode/**/*\n!.vscode/settings.json\n!.vscode/extensions.json\n.idea/\n\nsrc/\n\nmodern.config.*\njest.config.js\n.eslintrc.js\n.eslintrc\ntsconfig.json\nCHANGELOG.md\n\n**/*/api/typings/auto-generated\n",
|
|
6
6
|
"README.md": "# Modern.js Package\n\n## Setup\n\nInstall the dependencies:\n\n```bash\npnpm install\n```\n\n## Get Started\n\nRun and debug the module:\n\n```bash\npnpm dev\n```\n\nRun test cases:\n\n```bash\npnpm test\n```\n\nBuild the module for production:\n\n```bash\npnpm build\n```\n\nEnable optional features:\n\n```bash\npnpm new\n```\n\nOther commands:\n\n```bash\npnpm lint # Lint and fix source files\npnpm change # Add a new changeset\npnpm bump # Update version and changelog via changeset\npnpm release # Release the package\n```\n\nFor more information, see the [Modern.js Module documentation](https://modernjs.dev/module-tools/en).\n",
|
|
7
|
-
"package.json": '{\n "name": "modern-npm-module",\n "version": "0.1.0",\n "types": "./dist/types/index.d.ts",\n "main": "./dist/lib/index.js",\n "module": "./dist/es/index.js",\n "scripts": {\n "prepare": "modern build && husky install",\n "dev": "modern dev",\n "build": "modern build",\n "build:watch": "modern build -w",\n "reset": "rimraf ./**/node_modules",\n "lint": "modern lint",\n "change": "modern change",\n "bump": "modern bump",\n "pre": "modern pre",\n "change-status": "modern change-status",\n "gen-release-note": "modern gen-release-note",\n "release": "modern release",\n "new": "modern new",\n "upgrade": "modern upgrade"\n },\n "lint-staged": {\n "*.{js,jsx,ts,tsx,mjs,cjs}": [\n "node --max_old_space_size=8192 ./node_modules/eslint/bin/eslint.js --fix --color --cache --quiet"\n ]\n },\n "eslintIgnore": [\n "node_modules/",\n "dist/"\n ],\n "dependencies": {},\n "peerDependencies": {},\n "devDependencies": {\n "@modern-js/module-tools": "2.40.0",\n "@modern-js/eslint-config": "2.40.0",\n "typescript": "~5.0.4",\n "@types/
|
|
7
|
+
"package.json": '{\n "name": "modern-npm-module",\n "version": "0.1.0",\n "types": "./dist/types/index.d.ts",\n "main": "./dist/lib/index.js",\n "module": "./dist/es/index.js",\n "scripts": {\n "prepare": "modern build && husky install",\n "dev": "modern dev",\n "build": "modern build",\n "build:watch": "modern build -w",\n "reset": "rimraf ./**/node_modules",\n "lint": "modern lint",\n "change": "modern change",\n "bump": "modern bump",\n "pre": "modern pre",\n "change-status": "modern change-status",\n "gen-release-note": "modern gen-release-note",\n "release": "modern release",\n "new": "modern new",\n "upgrade": "modern upgrade"\n },\n "lint-staged": {\n "*.{js,jsx,ts,tsx,mjs,cjs}": [\n "node --max_old_space_size=8192 ./node_modules/eslint/bin/eslint.js --fix --color --cache --quiet"\n ]\n },\n "eslintIgnore": [\n "node_modules/",\n "dist/"\n ],\n "dependencies": {},\n "peerDependencies": {},\n "devDependencies": {\n "@modern-js/module-tools": "2.40.0",\n "@modern-js/eslint-config": "2.40.0",\n "typescript": "~5.0.4",\n "@types/node": "~16.11.7",\n "rimraf": "~3.0.2",\n "lint-staged": "~13.1.0",\n "prettier": "~2.8.1",\n "husky": "~8.0.1"\n },\n "sideEffects": [],\n "publishConfig": {\n "access": "public",\n "registry": "https://registry.npmjs.org/"\n }\n}\n',
|
|
8
8
|
"src/index.ts": "export default function () {\n return 'hello world';\n}\n",
|
|
9
|
-
"tsconfig.json": '{\n "compilerOptions": {\n "allowJs": true,\n "baseUrl": ".",\n "declaration": true,\n "emitDeclarationOnly": true,\n "esModuleInterop": true,\n "forceConsistentCasingInFileNames": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "lib": ["DOM", "ESNext"],\n "moduleResolution": "node",\n "paths": {\n "@/*": ["./src/*"]\n },\n "resolveJsonModule": true,\n "rootDir": "src",\n "skipLibCheck": true,\n "strict": true\n },\n "exclude": ["**/node_modules"],\n "include": ["src"]\n}\n',
|
|
10
9
|
"modern.config.ts": "import { moduleTools, defineConfig } from '@modern-js/module-tools';\n\nexport default defineConfig({\n plugins: [moduleTools()],\n buildPreset: 'npm-library',\n});\n",
|
|
10
|
+
"tsconfig.json": '{\n "compilerOptions": {\n "allowJs": true,\n "baseUrl": ".",\n "declaration": true,\n "emitDeclarationOnly": true,\n "esModuleInterop": true,\n "forceConsistentCasingInFileNames": true,\n "isolatedModules": true,\n "jsx": "preserve",\n "lib": ["DOM", "ESNext"],\n "moduleResolution": "node",\n "paths": {\n "@/*": ["./src/*"]\n },\n "resolveJsonModule": true,\n "rootDir": "src",\n "skipLibCheck": true,\n "strict": true\n },\n "exclude": ["**/node_modules"],\n "include": ["src"]\n}\n',
|
|
11
11
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/module-tools/types' />\n/// <reference types='@modern-js/plugin-testing/types' />\n"
|
|
12
12
|
}
|
|
13
13
|
};
|
|
@@ -8,8 +8,8 @@ const MWAFiles = {
|
|
|
8
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 runtime: {\n router: true,\n },\n plugins: [appTools()],\n});\n",
|
|
9
9
|
"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',
|
|
10
10
|
"src/modern-app-env.d.ts": "/// <reference types='@modern-js/app-tools/types' />\n/// <reference types='@modern-js/runtime/types' />\n/// <reference types='@modern-js/runtime/types/router' />\n",
|
|
11
|
-
"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",
|
|
12
11
|
"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: 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",
|
|
12
|
+
"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",
|
|
13
13
|
"src/routes/page.tsx": `import { Helmet } from '@modern-js/runtime/head';
|
|
14
14
|
import './index.css';
|
|
15
15
|
|
|
@@ -3,8 +3,8 @@ export declare const ModuleFiles: {
|
|
|
3
3
|
"README.md": string;
|
|
4
4
|
"package.json": string;
|
|
5
5
|
"src/index.ts": string;
|
|
6
|
-
"tsconfig.json": string;
|
|
7
6
|
"modern.config.ts": string;
|
|
7
|
+
"tsconfig.json": string;
|
|
8
8
|
"src/modern-app-env.d.ts": string;
|
|
9
9
|
".codesandbox/environment.json": string;
|
|
10
10
|
".codesandbox/tasks.json": string;
|
|
@@ -5,8 +5,8 @@ export declare const MWAFiles: {
|
|
|
5
5
|
"modern.config.ts": string;
|
|
6
6
|
"tsconfig.json": string;
|
|
7
7
|
"src/modern-app-env.d.ts": string;
|
|
8
|
-
"src/routes/layout.tsx": string;
|
|
9
8
|
"src/routes/index.css": string;
|
|
9
|
+
"src/routes/layout.tsx": string;
|
|
10
10
|
"src/routes/page.tsx": string;
|
|
11
11
|
".codesandbox/environment.json": string;
|
|
12
12
|
".codesandbox/tasks.json": string;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "0.0.0-nightly-
|
|
18
|
+
"version": "0.0.0-nightly-20231122170633",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"@types/recursive-readdir": "^2.2.1",
|
|
48
48
|
"@types/react": "^18",
|
|
49
49
|
"@types/react-dom": "^18",
|
|
50
|
-
"@modern-js/
|
|
51
|
-
"@modern-js/
|
|
52
|
-
"@modern-js/mwa-generator": "0.0.0-nightly-
|
|
53
|
-
"@modern-js/entry-generator": "0.0.0-nightly-
|
|
54
|
-
"@modern-js/generator-utils": "0.0.0-nightly-
|
|
55
|
-
"@modern-js/
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@scripts/jest-config": "0.0.0-nightly-
|
|
50
|
+
"@modern-js/base-generator": "0.0.0-nightly-20231122170633",
|
|
51
|
+
"@modern-js/module-generator": "0.0.0-nightly-20231122170633",
|
|
52
|
+
"@modern-js/mwa-generator": "0.0.0-nightly-20231122170633",
|
|
53
|
+
"@modern-js/entry-generator": "0.0.0-nightly-20231122170633",
|
|
54
|
+
"@modern-js/generator-utils": "0.0.0-nightly-20231122170633",
|
|
55
|
+
"@modern-js/utils": "0.0.0-nightly-20231122170633",
|
|
56
|
+
"@modern-js/generator-common": "0.0.0-nightly-20231122170633",
|
|
57
|
+
"@scripts/build": "0.0.0-nightly-20231122170633",
|
|
58
|
+
"@scripts/jest-config": "0.0.0-nightly-20231122170633"
|
|
59
59
|
},
|
|
60
60
|
"sideEffects": false,
|
|
61
61
|
"publishConfig": {
|