cordova-react-vite 3.0.4 → 3.0.6

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.
Files changed (2) hide show
  1. package/execute.js +42 -2
  2. package/package.json +1 -1
package/execute.js CHANGED
@@ -47,9 +47,9 @@ function main() {
47
47
  console.log("📦 create project React (Vite)...");
48
48
  run(`npm create vite@latest react -- --template react-ts`, rootPath);
49
49
  run(`npm install`, path.join(rootPath, "react"));
50
- // install aio-cordova
50
+ // install reactt packages
51
51
  console.log("📦 install aio-cordova in React...");
52
- run(`npm install aio-cordova`, path.join(rootPath, "react"));
52
+ run(`npm install aio-cordova aio-utils aio-date aio-apis aio-input aio-popup aio-table`, path.join(rootPath, "react"));
53
53
  // add <script src="cordova.js"> to index.html
54
54
  const indexHtmlPath = path.join(rootPath, "react", "index.html");
55
55
  if (fs.existsSync(indexHtmlPath)) {
@@ -83,9 +83,49 @@ const AndroidApp: FC<{cordova:AIOCordova}> = ({cordova}) => {
83
83
  return null;
84
84
  }
85
85
  `;
86
+ const appCssPath = path.join(rootPath, "react", "src", "App.css");
87
+ const appCssContent = `@font-face {
88
+ font-family: IRANSans-light;
89
+ font-style: normal;
90
+ font-weight: 300;
91
+ src: url('./assets/iransans/eot/IRANSansWeb(FaNum)_Light.eot');
92
+ src: url('./assets/iransans/eot/IRANSansWeb(FaNum)_Light.eot');
93
+ src: url('./assets/iransans/eot/IRANSansWeb(FaNum)_Light.eot?#iefix') format('embedded-opentype'),
94
+ url('./assets/iransans/woff2/IRANSansWeb(FaNum)_Light.woff2') format('woff2'),
95
+ url('./assets/iransans/woff/IRANSansWeb(FaNum)_Light.woff') format('woff'),
96
+ url('./assets/iransans/ttf/IRANSansWeb(FaNum)_Light.ttf') format('truetype');
97
+ }
98
+
99
+ @font-face {
100
+ font-family: IRANSans-ultra-light;
101
+ font-style: normal;
102
+ font-weight: 200;
103
+ src: url('./assets/iransans/eot/IRANSansWeb(FaNum)_UltraLight.eot');
104
+ src: url('./assets/iransans/eot/IRANSansWeb(FaNum)_UltraLight.eot?#iefix') format('embedded-opentype'),
105
+ url('./assets/iransans/woff2/IRANSansWeb(FaNum)_UltraLight.woff2') format('woff2'),
106
+ url('./assets/iransans/woff/IRANSansWeb(FaNum)_UltraLight.woff') format('woff'),
107
+ url('./assets/iransans/ttf/IRANSansWeb(FaNum)_UltraLight.ttf') format('truetype');
108
+ }
109
+
110
+ @font-face {
111
+ font-family: IRANSans-Medium;
112
+ font-style: normal;
113
+ font-weight: 200;
114
+ src: url('./assets/iransans/eot/IRANSansWeb(FaNum)_Medium.eot');
115
+ src: url('./assets/iransans/eot/IRANSansWeb(FaNum)_Medium.eot?#iefix') format('embedded-opentype'),
116
+ url('./assets/iransans/woff2/IRANSansWeb(FaNum)_Medium.woff2') format('woff2'),
117
+ url('./assets/iransans/woff/IRANSansWeb(FaNum)_Medium.woff') format('woff'),
118
+ url('./assets/iransans/ttf/IRANSansWeb(FaNum)_Medium.ttf') format('truetype');
119
+ }
120
+ body{
121
+ font-family:IRANSans-light;
122
+ }`
86
123
 
87
124
  fs.writeFileSync(appTsxPath, appTsxContent, "utf8");
88
125
  console.log("✔ src/App.tsx changed");
126
+ fs.writeFileSync(appCssPath, appCssContent, "utf8");
127
+ console.log("✔ src/App.css changed");
128
+
89
129
  // ---- Cordova ----
90
130
  console.log("creating cordova project");
91
131
  run(`npx cordova create cordova ${cordovaId} "${cordovaName}"`, rootPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-react-vite",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
4
4
  "description": "CLI to create a full React + Vite + Cordova project with Android platform",
5
5
  "main": "execute.js",
6
6
  "bin": {