@screegen/cli 0.0.2 → 0.0.3

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/dist/index.js CHANGED
@@ -79,14 +79,14 @@ Creating screegen project: ${projectName}
79
79
  "src/translations.ts"
80
80
  );
81
81
  await copyTemplate(
82
- "src/screens/FeaturesScreen.tsx.template",
82
+ "src/screens/ExampleScreen.tsx.template",
83
83
  targetDir,
84
- "src/screens/FeaturesScreen.tsx"
84
+ "src/screens/ExampleScreen.tsx"
85
85
  );
86
86
  await copyTemplate(
87
- "src/screens/FeaturesScreen.module.scss.template",
87
+ "src/screens/ExampleScreen.module.scss.template",
88
88
  targetDir,
89
- "src/screens/FeaturesScreen.module.scss"
89
+ "src/screens/ExampleScreen.module.scss"
90
90
  );
91
91
  console.log(chalk.green("Project created successfully!\n"));
92
92
  console.log(chalk.gray("Next steps:\n"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@screegen/cli",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "screegen": "bin/screegen.js"
@@ -17,8 +17,7 @@
17
17
  "dev": "tsup --watch",
18
18
  "build": "tsup",
19
19
  "lint": "eslint src",
20
- "test": "vitest run --coverage",
21
- "generate-templates": "tsx scripts/generate-templates.ts"
20
+ "test": "vitest run --coverage"
22
21
  },
23
22
  "dependencies": {
24
23
  "chalk": "^5.3.0",
@@ -0,0 +1,39 @@
1
+ # Dependencies
2
+ node_modules/
3
+
4
+ # Build outputs
5
+ dist/
6
+ build/
7
+
8
+ # Test coverage
9
+ coverage/
10
+
11
+ # Screenshots output
12
+ screenshots/
13
+ .screegen-temp/
14
+
15
+ # Misc
16
+ .DS_Store
17
+ *.local
18
+
19
+ # Logs
20
+ npm-debug.log*
21
+ yarn-debug.log*
22
+ yarn-error.log*
23
+
24
+ # Yarn
25
+ .pnp.*
26
+ .yarn/*
27
+ !.yarn/patches
28
+ !.yarn/plugins
29
+ !.yarn/releases
30
+ !.yarn/sdks
31
+ !.yarn/versions
32
+
33
+ # TypeScript
34
+ *.tsbuildinfo
35
+
36
+ # IDE
37
+ .idea/
38
+ *.swp
39
+ *.swo
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "{{projectName}}",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "private": true,
5
5
  "type": "module",
6
+ "packageManager": "yarn@4.6.0",
6
7
  "scripts": {
7
8
  "dev": "vite",
8
9
  "build": "tsc && vite build",
@@ -10,7 +11,8 @@
10
11
  "generate": "screegen generate"
11
12
  },
12
13
  "dependencies": {
13
- "@screegen/components": "^0.0.2",
14
+ "@screegen/components": "^0.0.3",
15
+ "@screegen/cli": "^0.0.3",
14
16
  "react": "^18.3.1",
15
17
  "react-dom": "^18.3.1",
16
18
  "react-router-dom": "^6.28.2"
@@ -1,41 +1,22 @@
1
- import { ProjectConfig, ScreenComponentProps } from "@screegen/components";
2
- import { FeaturesScreen } from "./src/screens/FeaturesScreen";
3
- import { t } from "./src/translations";
1
+ import { ProjectConfig } from '@screegen/components';
2
+ import { ExampleScreen } from './src/screens/ExampleScreen';
4
3
 
5
- export type AppLanguageCode = "en-US" | "de-DE";
6
-
7
- // Wrapper component that provides translations
8
- function FeaturesScreenWrapper({ language, deviceKey }: ScreenComponentProps) {
9
- return (
10
- <FeaturesScreen
11
- language={language}
12
- deviceKey={deviceKey}
13
- title={t(language, "title")}
14
- subtitle={t(language, "subtitle")}
15
- features={[
16
- { title: t(language, "feature1"), description: t(language, "feature1Desc") },
17
- { title: t(language, "feature2"), description: t(language, "feature2Desc") },
18
- ]}
19
- />
20
- );
21
- }
22
-
23
- const config: ProjectConfig<AppLanguageCode> = {
24
- languages: ["en-US", "de-DE"],
4
+ const config: ProjectConfig = {
5
+ languages: ['en-US', 'de-DE'],
25
6
  devices: [
26
7
  {
27
- key: "iphone",
28
- fastlaneKeys: ["APP_IPHONE_67"],
8
+ key: 'iphone',
9
+ fastlaneKeys: ['APP_IPHONE_67'],
29
10
  width: 1290,
30
11
  height: 2796,
31
- screens: [{ key: "features", component: FeaturesScreenWrapper }],
12
+ screens: [{ key: 'example', component: ExampleScreen }],
32
13
  },
33
14
  {
34
- key: "ipad",
35
- fastlaneKeys: ["APP_IPAD_PRO_129"],
15
+ key: 'ipad',
16
+ fastlaneKeys: ['APP_IPAD_PRO_129'],
36
17
  width: 2048,
37
18
  height: 2732,
38
- screens: [{ key: "features", component: FeaturesScreenWrapper }],
19
+ screens: [{ key: 'example', component: ExampleScreen }],
39
20
  },
40
21
  ],
41
22
  };
@@ -0,0 +1,29 @@
1
+ .container {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ justify-content: center;
6
+ min-height: 100%;
7
+ padding: 60px 40px;
8
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
9
+ color: white;
10
+ font-family: 'Lexend', system-ui, sans-serif;
11
+ }
12
+
13
+ .header {
14
+ text-align: center;
15
+ margin-bottom: 60px;
16
+ }
17
+
18
+ .title {
19
+ font-size: 120px;
20
+ font-weight: 400;
21
+ margin: 0 0 16px 0;
22
+ }
23
+
24
+ .subtitle {
25
+ font-size: 60px;
26
+ font-weight: 300;
27
+ opacity: 0.9;
28
+ margin: 0;
29
+ }
@@ -0,0 +1,16 @@
1
+ import { ScreenComponentProps } from '@screegen/components';
2
+ import styles from './ExampleScreen.module.scss';
3
+ import { t } from '../translations';
4
+
5
+ export function ExampleScreen({ language }: ScreenComponentProps) {
6
+ const title = t(language, 'title');
7
+ const subtitle = t(language, 'subtitle');
8
+ return (
9
+ <div className={styles.container}>
10
+ <div className={styles.header}>
11
+ <h1 className={styles.title}>{title}</h1>
12
+ <p className={styles.subtitle}>{subtitle}</p>
13
+ </div>
14
+ </div>
15
+ );
16
+ }
@@ -7,18 +7,10 @@ export const translations: Record<string, Record<string, string>> = {
7
7
  "en-US": {
8
8
  title: "Your App Name",
9
9
  subtitle: "The best app for your needs",
10
- feature1: "Amazing Feature",
11
- feature1Desc: "Description of this amazing feature",
12
- feature2: "Another Feature",
13
- feature2Desc: "Description of another great feature",
14
10
  },
15
11
  "de-DE": {
16
12
  title: "Deine App",
17
13
  subtitle: "Die beste App für deine Bedürfnisse",
18
- feature1: "Tolle Funktion",
19
- feature1Desc: "Beschreibung dieser tollen Funktion",
20
- feature2: "Weitere Funktion",
21
- feature2Desc: "Beschreibung einer weiteren Funktion",
22
14
  },
23
15
  };
24
16
 
@@ -1,57 +0,0 @@
1
- .container {
2
- display: flex;
3
- flex-direction: column;
4
- align-items: center;
5
- justify-content: center;
6
- min-height: 100%;
7
- padding: 60px 40px;
8
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
9
- color: white;
10
- font-family: "Lexend", system-ui, sans-serif;
11
- }
12
-
13
- .header {
14
- text-align: center;
15
- margin-bottom: 60px;
16
- }
17
-
18
- .title {
19
- font-size: 64px;
20
- font-weight: 400;
21
- margin: 0 0 16px 0;
22
- }
23
-
24
- .subtitle {
25
- font-size: 28px;
26
- font-weight: 300;
27
- opacity: 0.9;
28
- margin: 0;
29
- }
30
-
31
- .features {
32
- display: flex;
33
- flex-direction: column;
34
- gap: 32px;
35
- width: 100%;
36
- max-width: 800px;
37
- }
38
-
39
- .feature {
40
- background: rgba(255, 255, 255, 0.15);
41
- border-radius: 16px;
42
- padding: 32px;
43
- backdrop-filter: blur(10px);
44
- }
45
-
46
- .featureTitle {
47
- font-size: 24px;
48
- font-weight: 400;
49
- margin: 0 0 8px 0;
50
- }
51
-
52
- .featureDescription {
53
- font-size: 18px;
54
- font-weight: 300;
55
- opacity: 0.9;
56
- margin: 0;
57
- }
@@ -1,36 +0,0 @@
1
- import { ScreenComponentProps } from "@screegen/components";
2
- import styles from "./FeaturesScreen.module.scss";
3
-
4
- interface Feature {
5
- title: string;
6
- description: string;
7
- }
8
-
9
- interface FeaturesScreenProps extends ScreenComponentProps {
10
- title: string;
11
- subtitle: string;
12
- features: Feature[];
13
- }
14
-
15
- export function FeaturesScreen({
16
- title,
17
- subtitle,
18
- features,
19
- }: FeaturesScreenProps) {
20
- return (
21
- <div className={styles.container}>
22
- <div className={styles.header}>
23
- <h1 className={styles.title}>{title}</h1>
24
- <p className={styles.subtitle}>{subtitle}</p>
25
- </div>
26
- <div className={styles.features}>
27
- {features.map((feature, index) => (
28
- <div key={index} className={styles.feature}>
29
- <h3 className={styles.featureTitle}>{feature.title}</h3>
30
- <p className={styles.featureDescription}>{feature.description}</p>
31
- </div>
32
- ))}
33
- </div>
34
- </div>
35
- );
36
- }