create-ait-app 0.0.1
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/README.md +79 -0
- package/bin/index.js +4 -0
- package/package.json +33 -0
- package/src/main.js +534 -0
- package/template/README.md +26 -0
- package/template/__default/__samples/iaa/src/hooks/useInAppAds.tsx +122 -0
- package/template/__default/__samples/iaa/src/pages/InAppAdsPage.css +72 -0
- package/template/__default/__samples/iaa/src/pages/InAppAdsPage.tsx +79 -0
- package/template/__default/__samples/iap/public/icon-document.png +0 -0
- package/template/__default/__samples/iap/src/hooks/useInAppPurchase.ts +117 -0
- package/template/__default/__samples/iap/src/pages/InAppPurchasePage.css +115 -0
- package/template/__default/__samples/iap/src/pages/InAppPurchasePage.tsx +119 -0
- package/template/__default/src/App.css +104 -0
- package/template/__default/src/App.tsx +45 -0
- package/template/__default/src/index.css +27 -0
- package/template/__default/src/main.tsx +10 -0
- package/template/__tds/__samples/iaa/src/hooks/useInAppAds.tsx +132 -0
- package/template/__tds/__samples/iaa/src/pages/InAppAdsPage.tsx +92 -0
- package/template/__tds/__samples/iap/public/icon-document.png +0 -0
- package/template/__tds/__samples/iap/src/hooks/useInAppPurchase.ts +124 -0
- package/template/__tds/__samples/iap/src/pages/InAppPurchasePage.tsx +122 -0
- package/template/__tds/src/App.css +13 -0
- package/template/__tds/src/App.tsx +66 -0
- package/template/__tds/src/index.css +22 -0
- package/template/__tds/src/main.tsx +15 -0
- package/template/eslint.config.js +28 -0
- package/template/granite.config.ts +20 -0
- package/template/index.html +12 -0
- package/template/package.json +31 -0
- package/template/public/appsintoss-logo.png +0 -0
- package/template/src/vite-env.d.ts +6 -0
- package/template/tsconfig.app.json +22 -0
- package/template/tsconfig.json +7 -0
- package/template/tsconfig.node.json +20 -0
- package/template/vite.config.ts +6 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Asset, Button, Top } from "@toss/tds-mobile";
|
|
2
|
+
import "./App.css";
|
|
3
|
+
{{SAMPLE_IMPORTS}}
|
|
4
|
+
|
|
5
|
+
function App() {
|
|
6
|
+
{{PAGE_STATE_AND_ROUTES}}
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
<Top
|
|
10
|
+
title={<Top.TitleParagraph size={22}>반가워요</Top.TitleParagraph>}
|
|
11
|
+
subtitleBottom={
|
|
12
|
+
<Top.SubtitleParagraph size={17}>
|
|
13
|
+
앱인토스 개발을 시작해 보세요.
|
|
14
|
+
</Top.SubtitleParagraph>
|
|
15
|
+
}
|
|
16
|
+
/>
|
|
17
|
+
|
|
18
|
+
<div
|
|
19
|
+
style={{
|
|
20
|
+
display: "flex",
|
|
21
|
+
flexDirection: "column",
|
|
22
|
+
gap: "16px",
|
|
23
|
+
padding: "24px",
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
<Button
|
|
27
|
+
as="a"
|
|
28
|
+
variant="weak"
|
|
29
|
+
href="https://developers-apps-in-toss.toss.im"
|
|
30
|
+
target="_blank"
|
|
31
|
+
rel="noopener noreferrer"
|
|
32
|
+
>
|
|
33
|
+
개발자센터
|
|
34
|
+
</Button>
|
|
35
|
+
<Button
|
|
36
|
+
as="a"
|
|
37
|
+
variant="weak"
|
|
38
|
+
href="https://techchat-apps-in-toss.toss.im"
|
|
39
|
+
target="_blank"
|
|
40
|
+
rel="noopener noreferrer"
|
|
41
|
+
>
|
|
42
|
+
개발자 커뮤니티
|
|
43
|
+
</Button>
|
|
44
|
+
{{SAMPLE_BUTTONS}}
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div
|
|
48
|
+
style={{
|
|
49
|
+
position: "fixed",
|
|
50
|
+
bottom: "24px",
|
|
51
|
+
left: "50%",
|
|
52
|
+
transform: "translateX(-50%)",
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
<Asset.Image
|
|
56
|
+
alt="apps in toss logo"
|
|
57
|
+
frameShape={{ width: 160 }}
|
|
58
|
+
backgroundColor="transparent"
|
|
59
|
+
src={`${import.meta.env.BASE_URL}appsintoss-logo.png`}
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
</>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default App;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: sans-serif;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
* {
|
|
6
|
+
-webkit-tap-highlight-color: transparent;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
body {
|
|
10
|
+
margin: 0;
|
|
11
|
+
min-width: 320px;
|
|
12
|
+
min-height: 100vh;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@media (min-width: 481px) {
|
|
16
|
+
body {
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
background-color: #f5f5f5 !important;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TDSMobileAITProvider } from "@toss/tds-mobile-ait";
|
|
2
|
+
import { StrictMode } from "react";
|
|
3
|
+
import { createRoot } from "react-dom/client";
|
|
4
|
+
|
|
5
|
+
import config from "../granite.config.ts";
|
|
6
|
+
import App from "./App.tsx";
|
|
7
|
+
import "./index.css";
|
|
8
|
+
|
|
9
|
+
createRoot(document.getElementById("root")!).render(
|
|
10
|
+
<StrictMode>
|
|
11
|
+
<TDSMobileAITProvider brandPrimaryColor={config.brand.primaryColor}>
|
|
12
|
+
<App />
|
|
13
|
+
</TDSMobileAITProvider>
|
|
14
|
+
</StrictMode>,
|
|
15
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
+
import tseslint from 'typescript-eslint'
|
|
6
|
+
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
{ ignores: ['dist'] },
|
|
9
|
+
{
|
|
10
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
|
+
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
ecmaVersion: 2020,
|
|
14
|
+
globals: globals.browser,
|
|
15
|
+
},
|
|
16
|
+
plugins: {
|
|
17
|
+
'react-hooks': reactHooks,
|
|
18
|
+
'react-refresh': reactRefresh,
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
...reactHooks.configs.recommended.rules,
|
|
22
|
+
'react-refresh/only-export-components': [
|
|
23
|
+
'warn',
|
|
24
|
+
{ allowConstantExport: true },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineConfig } from "@apps-in-toss/web-framework/config";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
appName: "{{APP_NAME}}",
|
|
5
|
+
brand: {
|
|
6
|
+
displayName: "앱 이름", // 화면에 노출될 앱의 한글 이름으로 바꿔주세요.
|
|
7
|
+
primaryColor: "{{PRIMARY_COLOR}}", // 화면에 노출될 앱의 기본 색상으로 바꿔주세요.
|
|
8
|
+
icon: "", // 화면에 노출될 앱의 아이콘 이미지 주소로 바꿔주세요.
|
|
9
|
+
},
|
|
10
|
+
web: {
|
|
11
|
+
host: "localhost",
|
|
12
|
+
port: 5173,
|
|
13
|
+
commands: {
|
|
14
|
+
dev: "vite dev",
|
|
15
|
+
build: "vite build",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
permissions: [],
|
|
19
|
+
outdir: "dist",
|
|
20
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>AIT App</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{APP_NAME}}",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "granite dev",
|
|
8
|
+
"build": "ait build",
|
|
9
|
+
"deploy": "ait deploy",
|
|
10
|
+
"lint": "eslint .",
|
|
11
|
+
"format": "prettier --write ."
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"react": "^19.0.0",
|
|
15
|
+
"react-dom": "^19.0.0"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@eslint/js": "^9.21.0",
|
|
19
|
+
"prettier": "^3.4.2",
|
|
20
|
+
"@types/react": "^19.0.10",
|
|
21
|
+
"@types/react-dom": "^19.0.4",
|
|
22
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
23
|
+
"eslint": "^9.21.0",
|
|
24
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
25
|
+
"eslint-plugin-react-refresh": "^0.4.19",
|
|
26
|
+
"globals": "^15.15.0",
|
|
27
|
+
"typescript": "~5.7.2",
|
|
28
|
+
"typescript-eslint": "^8.24.1",
|
|
29
|
+
"vite": "^6.2.0"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsBuildInfo",
|
|
4
|
+
"target": "ES2020",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
|
+
"allowImportingTsExtensions": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"moduleDetection": "force",
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
"strict": true,
|
|
16
|
+
"noUnusedLocals": true,
|
|
17
|
+
"noUnusedParameters": true,
|
|
18
|
+
"noFallthroughCasesInSwitch": true,
|
|
19
|
+
"noUncheckedSideEffectImports": true
|
|
20
|
+
},
|
|
21
|
+
"include": ["src"]
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsBuildInfo",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"moduleDetection": "force",
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"noUnusedLocals": true,
|
|
15
|
+
"noUnusedParameters": true,
|
|
16
|
+
"noFallthroughCasesInSwitch": true,
|
|
17
|
+
"noUncheckedSideEffectImports": true
|
|
18
|
+
},
|
|
19
|
+
"include": ["vite.config.ts"]
|
|
20
|
+
}
|