cordova-react-vite 3.1.2 → 3.1.4
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/execute.js +8 -11
- package/package.json +1 -1
package/execute.js
CHANGED
|
@@ -49,7 +49,7 @@ function main() {
|
|
|
49
49
|
run(`npm install`, path.join(rootPath, "react"));
|
|
50
50
|
// install react packages
|
|
51
51
|
console.log("📦 install aio-cordova in React...");
|
|
52
|
-
run(`npm install aio-cordova aio-utils aio-date aio-apis aio-input aio-popup aio-table tailwindcss @tailwindcss/vite`, path.join(rootPath, "react"));
|
|
52
|
+
run(`npm install aio-cordova aio-utils aio-date aio-apis aio-input aio-popup aio-table tailwindcss @tailwindcss/vite @mdi/react @mdi/js`, 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)) {
|
|
@@ -62,25 +62,22 @@ function main() {
|
|
|
62
62
|
}
|
|
63
63
|
// ---- overwrite App.tsx ----
|
|
64
64
|
const appTsxPath = path.join(rootPath, "react", "src", "App.tsx");
|
|
65
|
-
const appTsxContent = `
|
|
66
|
-
import { FC } from "react";
|
|
65
|
+
const appTsxContent = `
|
|
66
|
+
import { type FC } from "react";
|
|
67
67
|
import { AIOCordovaComponent, AIOCordova } from "aio-cordova";
|
|
68
68
|
|
|
69
69
|
const App: FC = () => {
|
|
70
70
|
return (
|
|
71
71
|
<AIOCordovaComponent
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
appId='${npmName}'
|
|
73
|
+
start={(p) => <Start cordova={p.cordova} />}
|
|
74
74
|
/>
|
|
75
75
|
)
|
|
76
76
|
}
|
|
77
77
|
export default App;
|
|
78
78
|
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
const AndroidApp: FC<{cordova:AIOCordova}> = ({cordova}) => {
|
|
83
|
-
return null;
|
|
79
|
+
const Start: FC<{ cordova?: AIOCordova }> = ({ cordova }) => {
|
|
80
|
+
return null;
|
|
84
81
|
}
|
|
85
82
|
`;
|
|
86
83
|
const indexCssPath = path.join(rootPath, "react", "src", "index.css");
|
|
@@ -92,7 +89,7 @@ const appCssPath = path.join(rootPath, "react", "src", "App.css");
|
|
|
92
89
|
@import "tailwindcss";
|
|
93
90
|
|
|
94
91
|
@font-face {
|
|
95
|
-
font-family: IRANSans
|
|
92
|
+
font-family: IRANSans-light;
|
|
96
93
|
font-style: normal;
|
|
97
94
|
font-weight: 300;
|
|
98
95
|
src: url('./assets/iransans/eot/IRANSansWeb(FaNum)_Light.eot');
|