Commit 36821dd75feb320fd488a00b6b3ad14e546a2119
0 parents
feat: init
Showing
19 changed files
with
9726 additions
and
0 deletions
Too many changes to show.
To preserve performance only 12 of 19 files are displayed.
.browserslistrc
0 → 100644
.eslintrc.js
0 → 100644
.gitignore
0 → 100644
1 | +++ a/.gitignore | |
1 | +.DS_Store | |
2 | + | |
3 | +.pnp | |
4 | +.pnp.js | |
5 | +.env.local | |
6 | +.env.*.local | |
7 | +.history | |
8 | +*.log* | |
9 | + | |
10 | +node_modules/ | |
11 | +.yarn-integrity | |
12 | +.pnpm-store/ | |
13 | +*.tsbuildinfo | |
14 | +.eslintcache | |
15 | +.changeset/pre.json | |
16 | + | |
17 | +dist/ | |
18 | +coverage/ | |
19 | +release/ | |
20 | +output/ | |
21 | +output_resource/ | |
22 | +log/ | |
23 | + | |
24 | +.vscode/**/* | |
25 | +!.vscode/settings.json | |
26 | +!.vscode/extensions.json | |
27 | +.idea/ | |
28 | + | |
29 | +**/*/typings/auto-generated | |
30 | + | |
31 | +modern.config.local.* | ... | ... |
.husky/pre-commit
0 → 100755
.npmrc
0 → 100644
.nvmrc
0 → 100644
.prettierrc
0 → 100644
.vscode/extensions.json
0 → 100644
1 | +++ a/.vscode/extensions.json | |
1 | +{ | |
2 | + "recommendations": [ | |
3 | + "styled-components.vscode-styled-components", | |
4 | + "EditorConfig.editorconfig", | |
5 | + "dbaeumer.vscode-eslint", | |
6 | + "esbenp.prettier-vscode", | |
7 | + "streetsidesoftware.code-spell-checker", | |
8 | + "codezombiech.gitignore", | |
9 | + "aaron-bond.better-comments", | |
10 | + "jasonnutter.search-node-modules", | |
11 | + "jock.svg", | |
12 | + "mikestead.dotenv", | |
13 | + "vscode-icons-team.vscode-icons" | |
14 | + ] | |
15 | +} | ... | ... |
.vscode/settings.json
0 → 100644
1 | +++ a/.vscode/settings.json | |
1 | +{ | |
2 | + "files.associations": { | |
3 | + ".code-workspace": "jsonc", | |
4 | + ".eslintrc": "jsonc", | |
5 | + ".eslintrc*.json": "jsonc", | |
6 | + ".stylelintrc": "jsonc", | |
7 | + "stylelintrc": "jsonc", | |
8 | + "README": "markdown" | |
9 | + }, | |
10 | + "search.useIgnoreFiles": true, | |
11 | + "search.exclude": { | |
12 | + "**/dist": true, | |
13 | + "**/*.log": true, | |
14 | + "**/*.pid": true, | |
15 | + "**/.git": true, | |
16 | + "**/node_modules": true | |
17 | + }, | |
18 | + // | |
19 | + "editor.rulers": [80, 120], | |
20 | + "files.eol": "\n", | |
21 | + "files.trimTrailingWhitespace": true, | |
22 | + "files.insertFinalNewline": true, | |
23 | + // | |
24 | + "cSpell.diagnosticLevel": "Hint", | |
25 | + "eslint.run": "onType", | |
26 | + "eslint.probe": [ | |
27 | + "javascript", | |
28 | + "javascriptreact", | |
29 | + "typescript", | |
30 | + "typescriptreact", | |
31 | + "vue" | |
32 | + ], | |
33 | + "eslint.format.enable": true, | |
34 | + "eslint.lintTask.enable": true, | |
35 | + "javascript.validate.enable": false, | |
36 | + "typescript.validate.enable": true, | |
37 | + "css.validate": false, | |
38 | + "scss.validate": false, | |
39 | + "less.validate": false, | |
40 | + "[css]": { | |
41 | + "editor.formatOnType": true, | |
42 | + "editor.formatOnPaste": true, | |
43 | + "editor.formatOnSave": true | |
44 | + }, | |
45 | + "[scss]": { | |
46 | + "editor.formatOnType": true, | |
47 | + "editor.formatOnPaste": true, | |
48 | + "editor.formatOnSave": true | |
49 | + }, | |
50 | + "[less]": { | |
51 | + "editor.formatOnType": true, | |
52 | + "editor.formatOnPaste": true, | |
53 | + "editor.formatOnSave": true | |
54 | + }, | |
55 | + "editor.codeActionsOnSave": { | |
56 | + "source.fixAll.eslint": "explicit" | |
57 | + }, | |
58 | + "editor.defaultFormatter": "esbenp.prettier-vscode", | |
59 | + "javascript.format.enable": false, | |
60 | + "typescript.format.enable": false, | |
61 | + // | |
62 | + "json.format.enable": false, | |
63 | + "[json]": { | |
64 | + "editor.tabSize": 2, | |
65 | + "editor.formatOnType": true, | |
66 | + "editor.formatOnPaste": true, | |
67 | + "editor.formatOnSave": true | |
68 | + }, | |
69 | + "[jsonc]": { | |
70 | + "editor.tabSize": 2, | |
71 | + "editor.formatOnType": true, | |
72 | + "editor.formatOnPaste": true, | |
73 | + "editor.formatOnSave": true | |
74 | + }, | |
75 | + "emmet.triggerExpansionOnTab": true, | |
76 | + "typescript.tsdk": "node_modules/typescript/lib" | |
77 | +} | ... | ... |
README.md
0 → 100644
1 | +++ a/README.md | |
1 | +# Modern.js App | |
2 | + | |
3 | +## Setup | |
4 | + | |
5 | +Install the dependencies: | |
6 | + | |
7 | +```bash | |
8 | +pnpm install | |
9 | +``` | |
10 | + | |
11 | +## Get Started | |
12 | + | |
13 | +Start the dev server: | |
14 | + | |
15 | +```bash | |
16 | +pnpm dev | |
17 | +``` | |
18 | + | |
19 | +Enable optional features or add a new entry: | |
20 | + | |
21 | +```bash | |
22 | +pnpm new | |
23 | +``` | |
24 | + | |
25 | +Build the app for production: | |
26 | + | |
27 | +```bash | |
28 | +pnpm build | |
29 | +``` | |
30 | + | |
31 | +Preview the production build locally: | |
32 | + | |
33 | +```bash | |
34 | +pnpm serve | |
35 | +``` | |
36 | + | |
37 | +For more information, see the [Modern.js documentation](https://modernjs.dev/en). | ... | ... |
modern.config.ts
0 → 100644
1 | +++ a/modern.config.ts | |
1 | +import { appTools, defineConfig } from '@modern-js/app-tools'; | |
2 | + | |
3 | +// https://modernjs.dev/en/configure/app/usage | |
4 | +export default defineConfig({ | |
5 | + runtime: { | |
6 | + router: true, | |
7 | + }, | |
8 | + plugins: [ | |
9 | + appTools({ | |
10 | + bundler: 'experimental-rspack', | |
11 | + }), | |
12 | + ], | |
13 | +}); | ... | ... |
package.json
0 → 100644
1 | +++ a/package.json | |
1 | +{ | |
2 | + "name": "fw-h5app-demo", | |
3 | + "version": "0.1.0", | |
4 | + "scripts": { | |
5 | + "reset": "npx rimraf ./**/node_modules", | |
6 | + "dev": "modern dev", | |
7 | + "build": "modern build", | |
8 | + "start": "modern start", | |
9 | + "serve": "modern serve", | |
10 | + "new": "modern new", | |
11 | + "lint": "modern lint", | |
12 | + "prepare": "husky install", | |
13 | + "upgrade": "modern upgrade" | |
14 | + }, | |
15 | + "engines": { | |
16 | + "node": ">=16.18.1" | |
17 | + }, | |
18 | + "lint-staged": { | |
19 | + "*.{js,jsx,ts,tsx,mjs,cjs}": [ | |
20 | + "node --max_old_space_size=8192 ./node_modules/eslint/bin/eslint.js --fix --color --cache --quiet" | |
21 | + ] | |
22 | + }, | |
23 | + "eslintIgnore": [ | |
24 | + "node_modules/", | |
25 | + "dist/" | |
26 | + ], | |
27 | + "dependencies": { | |
28 | + "@modern-js/runtime": "2.48.5", | |
29 | + "react": "~18.2.0", | |
30 | + "react-dom": "~18.2.0" | |
31 | + }, | |
32 | + "devDependencies": { | |
33 | + "@modern-js/app-tools": "2.48.5", | |
34 | + "@modern-js/eslint-config": "2.48.5", | |
35 | + "@modern-js/tsconfig": "2.48.5", | |
36 | + "@modern-js-app/eslint-config": "2.48.5", | |
37 | + "typescript": "~5.0.4", | |
38 | + "@types/jest": "~29.2.4", | |
39 | + "@types/node": "~16.11.7", | |
40 | + "@types/react": "~18.0.26", | |
41 | + "@types/react-dom": "~18.0.10", | |
42 | + "lint-staged": "~13.1.0", | |
43 | + "prettier": "~2.8.1", | |
44 | + "husky": "~8.0.1", | |
45 | + "rimraf": "~3.0.2" | |
46 | + } | |
47 | +} | ... | ... |