This repository has been archived by the owner on Nov 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
243 changed files
with
14,536 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1 @@ | ||
declare module '*.module.less' { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
|
||
declare module '*.module.css' { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
|
||
declare module '*.module.scss' { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
/// <reference types="@ice/app/types" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,4 +89,4 @@ export function getStaticData() { | |
count: 100, | ||
from: 'getStaticData', | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1 @@ | ||
declare module '*.module.less' { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
|
||
declare module '*.module.css' { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
|
||
declare module '*.module.scss' { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
/// <reference types="@ice/app/types" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1 @@ | ||
declare module '*.module.less' { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
|
||
declare module '*.module.css' { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
|
||
declare module '*.module.scss' { | ||
const classes: { [key: string]: string }; | ||
export default classes; | ||
} | ||
/// <reference types="@ice/app/types" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { defineConfig } from '@ice/app'; | ||
|
||
export default defineConfig({ | ||
dataLoader: false, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "disable-data-loader", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"start": "ice start", | ||
"build": "ice build", | ||
"build:splitChunks": "ice build --config splitChunks.config.mts" | ||
}, | ||
"description": "", | ||
"author": "", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@ice/app": "workspace:*", | ||
"@ice/plugin-auth": "workspace:*", | ||
"@ice/plugin-rax-compat": "workspace:*", | ||
"@ice/runtime": "workspace:*", | ||
"@uni/env": "^1.1.0", | ||
"ahooks": "^3.3.8", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.0.0", | ||
"@types/react-dom": "^18.0.2", | ||
"speed-measure-webpack-plugin": "^1.5.0", | ||
"webpack": "^5.73.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { defineAppConfig } from 'ice'; | ||
import type { GetAppData } from 'ice'; | ||
|
||
export default defineAppConfig({ | ||
app: { | ||
rootId: 'app', | ||
}, | ||
}); | ||
|
||
export const getAppData: GetAppData = () => { | ||
return new Promise((resolve) => { | ||
resolve({ | ||
title: 'gogogogo', | ||
auth: { | ||
admin: true, | ||
}, | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Meta, Title, Links, Main, Scripts } from 'ice'; | ||
|
||
function Document() { | ||
return ( | ||
<html> | ||
<head> | ||
<meta charSet="utf-8" /> | ||
<meta name="description" content="ICE 3.0 Demo" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<Meta /> | ||
<Title /> | ||
<Links /> | ||
</head> | ||
<body> | ||
<Main /> | ||
<Scripts /> | ||
</body> | ||
</html> | ||
); | ||
} | ||
|
||
export default Document; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
export default function Home() { | ||
return ( | ||
<> | ||
<h2 className="title">Home Page</h2> | ||
</> | ||
); | ||
} | ||
|
||
export function getConfig() { | ||
return { | ||
title: 'Home', | ||
meta: [ | ||
{ | ||
name: 'theme-color', | ||
content: '#000', | ||
}, | ||
{ | ||
name: 'title-color', | ||
content: '#f00', | ||
}, | ||
], | ||
auth: ['admin'], | ||
}; | ||
} | ||
|
||
export function getData({ pathname, query }) { | ||
return new Promise((resolve) => { | ||
setTimeout(() => { | ||
resolve({ | ||
name: 'Home', | ||
count: 100, | ||
pathname, | ||
query, | ||
}); | ||
}, 1 * 100); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"compileOnSave": false, | ||
"buildOnSave": false, | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"outDir": "build", | ||
"module": "esnext", | ||
"target": "es6", | ||
"jsx": "react-jsx", | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true, | ||
"lib": ["es6", "dom"], | ||
"sourceMap": true, | ||
"allowJs": true, | ||
"rootDir": "./", | ||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noImplicitAny": false, | ||
"importHelpers": true, | ||
"strictNullChecks": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"noUnusedLocals": true, | ||
"skipLibCheck": true, | ||
"paths": { | ||
"@/*": ["./src/*"], | ||
"ice": [".ice"] | ||
} | ||
}, | ||
"include": ["src", ".ice", "ice.config.*"], | ||
"exclude": ["node_modules", "build", "public"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
chrome 55 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { defineConfig } from '@ice/app'; | ||
|
||
export default defineConfig({ | ||
alias: { | ||
components: './src/components', | ||
}, | ||
// TODO: | ||
// proxy: {} | ||
sourceMap: false, | ||
// eslint: false, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
'/api/foo': { foo: 'foo' }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type { Request, Response } from 'express'; | ||
|
||
export default { | ||
'GET /api/users': ['a', 'b'], | ||
'POST /api/users/:id': (req: Request, res: Response) => { | ||
const { id } = req.params; | ||
res.send({ id: id }); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "miniapp-project", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"start": "ice start", | ||
"start:wechat": "ice start --platform wechat-miniprogram", | ||
"start:ali": "ice start --platform ali-miniapp", | ||
"build": "ice build", | ||
"build:wechat": "ice build --platform wechat-miniprogram" | ||
}, | ||
"description": "", | ||
"author": "", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@ice/app": "workspace:*", | ||
"@ice/runtime": "workspace:*", | ||
"ahooks": "^3.3.8", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.0.0", | ||
"@types/react-dom": "^18.0.2", | ||
"browserslist": "^4.19.3", | ||
"speed-measure-webpack-plugin": "^1.5.0", | ||
"webpack": "^5.73.0" | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { defineAppConfig, type GetAppData } from 'ice'; | ||
|
||
export const getAppData: GetAppData = () => { | ||
return new Promise((resolve) => { | ||
resolve({ | ||
success: true, | ||
id: 34293, | ||
}); | ||
}); | ||
}; | ||
|
||
|
||
export const miniappManifest = { | ||
title: 'miniapp test', | ||
routes: [ | ||
'index', | ||
'about', | ||
'second/profile', | ||
], | ||
}; | ||
|
||
export default defineAppConfig({ | ||
app: { | ||
rootId: 'app', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.logo { | ||
width: 200rpx; | ||
height: 180rpx; | ||
margin-bottom: 20rpx; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function Bar() { | ||
return ( | ||
<view> | ||
bar | ||
</view> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Meta, Title, Links, Main, Scripts } from 'ice'; | ||
|
||
function Document() { | ||
return ( | ||
<html> | ||
<head> | ||
<meta charSet="utf-8" /> | ||
<meta name="description" content="ICE 3.0 Demo" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<Meta /> | ||
<Title /> | ||
<Links /> | ||
</head> | ||
<body> | ||
<Main /> | ||
<Scripts /> | ||
</body> | ||
</html> | ||
); | ||
} | ||
|
||
export default Document; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.global { | ||
font-size: 14px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// import './index.css'; | ||
|
||
export default function Home() { | ||
return ( | ||
<> | ||
<view className="title">About</view> | ||
</> | ||
); | ||
} | ||
|
||
export function getConfig() { | ||
return { | ||
title: 'About', | ||
}; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.