@fto-consult/expo-ui 3.1.1 → 3.2.0
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/babel.config.alias.js +6 -4
- package/bin/index.js +92 -0
- package/bin/parseArgs.js +18 -0
- package/electron/copyDir.js +18 -0
- package/electron/createDir.js +14 -0
- package/electron/dist/asset-manifest.json +221 -0
- package/electron/dist/favicon-16.png +0 -0
- package/electron/dist/favicon-32.png +0 -0
- package/electron/dist/favicon.ico +0 -0
- package/electron/dist/fonts/AntDesign.ttf +0 -0
- package/electron/dist/fonts/FontAwesome5_Brands.ttf +0 -0
- package/electron/dist/fonts/FontAwesome5_Solid.ttf +0 -0
- package/electron/dist/fonts/Fontisto.ttf +0 -0
- package/electron/dist/fonts/Foundation.ttf +0 -0
- package/electron/dist/fonts/Ionicons.ttf +0 -0
- package/electron/dist/fonts/MaterialCommunityIcons.ttf +0 -0
- package/electron/dist/fonts/MaterialIcons.ttf +0 -0
- package/electron/dist/fonts/SimpleLineIcons.ttf +0 -0
- package/electron/dist/index.html +1 -0
- package/electron/dist/manifest.json +35 -0
- package/electron/dist/pwa/apple-touch-icon/apple-touch-icon-180.png +0 -0
- package/electron/dist/pwa/apple-touch-startup-image/apple-touch-startup-image-1125x2436.png +0 -0
- package/electron/dist/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2208.png +0 -0
- package/electron/dist/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2688.png +0 -0
- package/electron/dist/pwa/apple-touch-startup-image/apple-touch-startup-image-1536x2048.png +0 -0
- package/electron/dist/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2224.png +0 -0
- package/electron/dist/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2388.png +0 -0
- package/electron/dist/pwa/apple-touch-startup-image/apple-touch-startup-image-2048x2732.png +0 -0
- package/electron/dist/pwa/apple-touch-startup-image/apple-touch-startup-image-640x1136.png +0 -0
- package/electron/dist/pwa/apple-touch-startup-image/apple-touch-startup-image-750x1334.png +0 -0
- package/electron/dist/pwa/apple-touch-startup-image/apple-touch-startup-image-828x1792.png +0 -0
- package/electron/dist/pwa/chrome-icon/chrome-icon-144.png +0 -0
- package/electron/dist/pwa/chrome-icon/chrome-icon-192.png +0 -0
- package/electron/dist/pwa/chrome-icon/chrome-icon-512.png +0 -0
- package/electron/dist/serve.json +13 -0
- package/electron/dist/static/js/2.e3d2de23.chunk.js +2 -0
- package/electron/dist/static/js/2.e3d2de23.chunk.js.LICENSE.txt +118 -0
- package/electron/dist/static/js/app.6a0a3d72.chunk.js +1 -0
- package/electron/dist/static/js/runtime~app.318494c4.js +1 -0
- package/electron/dist/static/media/ad.897c877d.png +0 -0
- package/electron/dist/static/media/add_photo.255dd6dd.png +0 -0
- package/electron/dist/static/media/af.9d0ab233.png +0 -0
- package/electron/dist/static/media/ag.152f8fb1.png +0 -0
- package/electron/dist/static/media/ai.81342ed3.png +0 -0
- package/electron/dist/static/media/al.3ba17dc1.png +0 -0
- package/electron/dist/static/media/ao.ff6d0e82.png +0 -0
- package/electron/dist/static/media/ar.a157e7e8.png +0 -0
- package/electron/dist/static/media/as.af7d5792.png +0 -0
- package/electron/dist/static/media/au.d8b2590e.png +0 -0
- package/electron/dist/static/media/aw.27c4c0ae.png +0 -0
- package/electron/dist/static/media/ax.568ed280.png +0 -0
- package/electron/dist/static/media/az.bb76a7dc.png +0 -0
- package/electron/dist/static/media/ba.0e3d844b.png +0 -0
- package/electron/dist/static/media/bb.4466d275.png +0 -0
- package/electron/dist/static/media/bd.56c6c3f7.png +0 -0
- package/electron/dist/static/media/bf.fb7bf643.png +0 -0
- package/electron/dist/static/media/bi.82121bd1.png +0 -0
- package/electron/dist/static/media/bl.c4f6b8c1.png +0 -0
- package/electron/dist/static/media/black-gradient-rotated.693a1835.png +0 -0
- package/electron/dist/static/media/bm.2b05930c.png +0 -0
- package/electron/dist/static/media/bn.fa1d112b.png +0 -0
- package/electron/dist/static/media/br.0bdb59a4.png +0 -0
- package/electron/dist/static/media/bs.cf3fb4b9.png +0 -0
- package/electron/dist/static/media/bt.f7bc1b24.png +0 -0
- package/electron/dist/static/media/by.aa680616.png +0 -0
- package/electron/dist/static/media/bz.94f967a4.png +0 -0
- package/electron/dist/static/media/ca.83c317eb.png +0 -0
- package/electron/dist/static/media/cc.7adb7e83.png +0 -0
- package/electron/dist/static/media/cd.829a5467.png +0 -0
- package/electron/dist/static/media/cf.05804c68.png +0 -0
- package/electron/dist/static/media/cg.6142b05b.png +0 -0
- package/electron/dist/static/media/ck.e6517d3a.png +0 -0
- package/electron/dist/static/media/cl.fedf287b.png +0 -0
- package/electron/dist/static/media/cm.13460532.png +0 -0
- package/electron/dist/static/media/cn.cb27a726.png +0 -0
- package/electron/dist/static/media/color-wheel.233ad67a.png +0 -0
- package/electron/dist/static/media/cu.c87a4974.png +0 -0
- package/electron/dist/static/media/cv.df006f17.png +0 -0
- package/electron/dist/static/media/cw.5600a05a.png +0 -0
- package/electron/dist/static/media/cx.3a1ed4dd.png +0 -0
- package/electron/dist/static/media/cy.cf9ba1fd.png +0 -0
- package/electron/dist/static/media/cz.52a635d1.png +0 -0
- package/electron/dist/static/media/dj.97fab2d0.png +0 -0
- package/electron/dist/static/media/dm.cffeea69.png +0 -0
- package/electron/dist/static/media/do.4446e007.png +0 -0
- package/electron/dist/static/media/dz.2a4f02c8.png +0 -0
- package/electron/dist/static/media/ec.de3c8959.png +0 -0
- package/electron/dist/static/media/eg.995e438f.png +0 -0
- package/electron/dist/static/media/eh.df6ab877.png +0 -0
- package/electron/dist/static/media/er.c9c33d69.png +0 -0
- package/electron/dist/static/media/es.02bde626.png +0 -0
- package/electron/dist/static/media/et.97067753.png +0 -0
- package/electron/dist/static/media/fj.d9ffe455.png +0 -0
- package/electron/dist/static/media/fk.56b62350.png +0 -0
- package/electron/dist/static/media/fm.a7a0ab08.png +0 -0
- package/electron/dist/static/media/fo.8c98723b.png +0 -0
- package/electron/dist/static/media/gb.e2dc562c.png +0 -0
- package/electron/dist/static/media/gd.e018fcab.png +0 -0
- package/electron/dist/static/media/ge.a23ea813.png +0 -0
- package/electron/dist/static/media/gf.46575309.png +0 -0
- package/electron/dist/static/media/gg.b6dec865.png +0 -0
- package/electron/dist/static/media/gh.791206c9.png +0 -0
- package/electron/dist/static/media/gi.691dc59f.png +0 -0
- package/electron/dist/static/media/gp.9f13aec5.png +0 -0
- package/electron/dist/static/media/gq.ac167f44.png +0 -0
- package/electron/dist/static/media/gt.ac025893.png +0 -0
- package/electron/dist/static/media/gu.f6b1f79f.png +0 -0
- package/electron/dist/static/media/gw.c1155330.png +0 -0
- package/electron/dist/static/media/gy.8807a5cd.png +0 -0
- package/electron/dist/static/media/hk.ace33e25.png +0 -0
- package/electron/dist/static/media/hn.a9dbb8c7.png +0 -0
- package/electron/dist/static/media/hr.154eb536.png +0 -0
- package/electron/dist/static/media/ht.f2777c6f.png +0 -0
- package/electron/dist/static/media/il.1e46d4c0.png +0 -0
- package/electron/dist/static/media/im.0cd40434.png +0 -0
- package/electron/dist/static/media/in.7b42511c.png +0 -0
- package/electron/dist/static/media/io.a66fbed7.png +0 -0
- package/electron/dist/static/media/iq.95e38849.png +0 -0
- package/electron/dist/static/media/ir.63bb306b.png +0 -0
- package/electron/dist/static/media/je.9bb61268.png +0 -0
- package/electron/dist/static/media/jm.cb108953.png +0 -0
- package/electron/dist/static/media/jo.68d39a37.png +0 -0
- package/electron/dist/static/media/jp.c7ac0358.png +0 -0
- package/electron/dist/static/media/ke.43bc8ed5.png +0 -0
- package/electron/dist/static/media/kg.44ff839a.png +0 -0
- package/electron/dist/static/media/kh.f2be65a8.png +0 -0
- package/electron/dist/static/media/ki.a5251ff4.png +0 -0
- package/electron/dist/static/media/km.e3509f11.png +0 -0
- package/electron/dist/static/media/kn.2aa7e9f4.png +0 -0
- package/electron/dist/static/media/kp.bafa6d30.png +0 -0
- package/electron/dist/static/media/kr.eddab993.png +0 -0
- package/electron/dist/static/media/ks.482617ea.png +0 -0
- package/electron/dist/static/media/kw.c9acc015.png +0 -0
- package/electron/dist/static/media/ky.b28eed47.png +0 -0
- package/electron/dist/static/media/kz.705cf40b.png +0 -0
- package/electron/dist/static/media/la.eaa60883.png +0 -0
- package/electron/dist/static/media/lb.f12e48b3.png +0 -0
- package/electron/dist/static/media/lc.c3040f1b.png +0 -0
- package/electron/dist/static/media/li.9ff57114.png +0 -0
- package/electron/dist/static/media/lk.668fa761.png +0 -0
- package/electron/dist/static/media/lr.08a3ba29.png +0 -0
- package/electron/dist/static/media/ls.4bcf7705.png +0 -0
- package/electron/dist/static/media/ly.42eee630.png +0 -0
- package/electron/dist/static/media/ma.728f368e.png +0 -0
- package/electron/dist/static/media/md.c58d4da5.png +0 -0
- package/electron/dist/static/media/me.61434fc0.png +0 -0
- package/electron/dist/static/media/mh.84081090.png +0 -0
- package/electron/dist/static/media/mk.4c61eb33.png +0 -0
- package/electron/dist/static/media/mm.6d9513ec.png +0 -0
- package/electron/dist/static/media/mn.2919ee2b.png +0 -0
- package/electron/dist/static/media/mo.5097fc81.png +0 -0
- package/electron/dist/static/media/mp.92d6f5ae.png +0 -0
- package/electron/dist/static/media/mq.3dcb40dd.png +0 -0
- package/electron/dist/static/media/mr.49624c44.png +0 -0
- package/electron/dist/static/media/ms.6278c883.png +0 -0
- package/electron/dist/static/media/mt.6791f29d.png +0 -0
- package/electron/dist/static/media/mv.db8c2815.png +0 -0
- package/electron/dist/static/media/mw.bfe46c8a.png +0 -0
- package/electron/dist/static/media/mx.4143a6ea.png +0 -0
- package/electron/dist/static/media/my.3a9e0a16.png +0 -0
- package/electron/dist/static/media/mz.a9a7cad4.png +0 -0
- package/electron/dist/static/media/na.fb15ec16.png +0 -0
- package/electron/dist/static/media/nc.ca80861c.png +0 -0
- package/electron/dist/static/media/ne.66306a2b.png +0 -0
- package/electron/dist/static/media/nf.2087392a.png +0 -0
- package/electron/dist/static/media/ni.8a8af9c4.png +0 -0
- package/electron/dist/static/media/np.fcb697b2.png +0 -0
- package/electron/dist/static/media/nr.3df193fa.png +0 -0
- package/electron/dist/static/media/nu.36adcc05.png +0 -0
- package/electron/dist/static/media/nz.3f54cdbc.png +0 -0
- package/electron/dist/static/media/om.b705fe37.png +0 -0
- package/electron/dist/static/media/pa.c6eac52a.png +0 -0
- package/electron/dist/static/media/pf.fc525a54.png +0 -0
- package/electron/dist/static/media/pg.e74ec337.png +0 -0
- package/electron/dist/static/media/ph.07b69cb2.png +0 -0
- package/electron/dist/static/media/pk.2e6f6e4d.png +0 -0
- package/electron/dist/static/media/placeholder.b393bdf6.png +0 -0
- package/electron/dist/static/media/pm.a07b0fe5.png +0 -0
- package/electron/dist/static/media/pr.2a745d06.png +0 -0
- package/electron/dist/static/media/ps.dc835d4b.png +0 -0
- package/electron/dist/static/media/pt.1dac29ce.png +0 -0
- package/electron/dist/static/media/pw.39ee4879.png +0 -0
- package/electron/dist/static/media/py.79fe22b8.png +0 -0
- package/electron/dist/static/media/re.d61c1475.png +0 -0
- package/electron/dist/static/media/rs.98e0ba03.png +0 -0
- package/electron/dist/static/media/rw.a062e5ed.png +0 -0
- package/electron/dist/static/media/sa.d8b4fac4.png +0 -0
- package/electron/dist/static/media/sb.22cdaa99.png +0 -0
- package/electron/dist/static/media/sc.bfa8934e.png +0 -0
- package/electron/dist/static/media/sd.c17685b4.png +0 -0
- package/electron/dist/static/media/sg.d63e1e98.png +0 -0
- package/electron/dist/static/media/sh.3e4eba58.png +0 -0
- package/electron/dist/static/media/si.1aef990c.png +0 -0
- package/electron/dist/static/media/sk.744710e9.png +0 -0
- package/electron/dist/static/media/sm.2add86d0.png +0 -0
- package/electron/dist/static/media/sn.cd1d239a.png +0 -0
- package/electron/dist/static/media/so.59e58870.png +0 -0
- package/electron/dist/static/media/sr.4f2004a0.png +0 -0
- package/electron/dist/static/media/ss.4af3b81d.png +0 -0
- package/electron/dist/static/media/st.d51dc713.png +0 -0
- package/electron/dist/static/media/sv.7ae84ee8.png +0 -0
- package/electron/dist/static/media/sx.be650d49.png +0 -0
- package/electron/dist/static/media/sy.aff3aad3.png +0 -0
- package/electron/dist/static/media/sz.2d1d3b4d.png +0 -0
- package/electron/dist/static/media/tc.a260af55.png +0 -0
- package/electron/dist/static/media/tg.8f3da96a.png +0 -0
- package/electron/dist/static/media/tj.f75888d4.png +0 -0
- package/electron/dist/static/media/tk.565e8b1a.png +0 -0
- package/electron/dist/static/media/tl.e2a54e11.png +0 -0
- package/electron/dist/static/media/tm.c4300af4.png +0 -0
- package/electron/dist/static/media/tn.75753d15.png +0 -0
- package/electron/dist/static/media/tr.82e5dc1c.png +0 -0
- package/electron/dist/static/media/tt.987092e9.png +0 -0
- package/electron/dist/static/media/tv.9230640c.png +0 -0
- package/electron/dist/static/media/tw.c4a9d7d9.png +0 -0
- package/electron/dist/static/media/tz.1efa60a0.png +0 -0
- package/electron/dist/static/media/ug.a77c73ae.png +0 -0
- package/electron/dist/static/media/us.e2479214.png +0 -0
- package/electron/dist/static/media/uy.861eca98.png +0 -0
- package/electron/dist/static/media/uz.01ff6d78.png +0 -0
- package/electron/dist/static/media/va.27433401.png +0 -0
- package/electron/dist/static/media/vc.2cca122b.png +0 -0
- package/electron/dist/static/media/ve.af5a8b6b.png +0 -0
- package/electron/dist/static/media/vg.04a0bb4c.png +0 -0
- package/electron/dist/static/media/vi.23080fa1.png +0 -0
- package/electron/dist/static/media/vn.c4418522.png +0 -0
- package/electron/dist/static/media/vu.a9b9829b.png +0 -0
- package/electron/dist/static/media/wf.c9a34a89.png +0 -0
- package/electron/dist/static/media/ws.155d3921.png +0 -0
- package/electron/dist/static/media/za.45fc2a3d.png +0 -0
- package/electron/dist/static/media/zm.2a5e46b1.png +0 -0
- package/electron/dist/static/media/zw.44f54d41.png +0 -0
- package/electron/exec.js +53 -0
- package/electron/writeFile.js +7 -0
- package/package.json +4 -4
- package/bin/electron/index copy.js +0 -48
- package/bin/electron/index.js +0 -11
- package/bin/electron/scripts/customize.js +0 -21
- package/bin/electron/scripts/start.js +0 -8
- package/electron/webpack.config.js +0 -84
- package/electron/webpack.config.old.js +0 -45
- package/is-os-case-sensitive.js +0 -27
- package/writeFile.js +0 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fto-consult/expo-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
"delete-node-modules": "rimraf ./**/node_modules",
|
|
43
43
|
"modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'"
|
|
44
44
|
},
|
|
45
|
-
"bin":
|
|
46
|
-
"electron": "bin/electron/index.js"
|
|
47
|
-
},
|
|
45
|
+
"bin": "bin/index.js",
|
|
48
46
|
"repository": {
|
|
49
47
|
"type": "git",
|
|
50
48
|
"url": "git+https://github.com/borispipo/expo-ui.git"
|
|
@@ -72,6 +70,7 @@
|
|
|
72
70
|
"@react-navigation/native-stack": "^6.9.7",
|
|
73
71
|
"@shopify/flash-list": "1.3.1",
|
|
74
72
|
"conf": "^10.2.0",
|
|
73
|
+
"electron": "^22.1.0",
|
|
75
74
|
"expo": "^47.0.8",
|
|
76
75
|
"expo-camera": "~13.1.0",
|
|
77
76
|
"expo-clipboard": "~4.0.1",
|
|
@@ -83,6 +82,7 @@
|
|
|
83
82
|
"expo-system-ui": "~2.0.1",
|
|
84
83
|
"expo-web-browser": "~12.0.0",
|
|
85
84
|
"file-saver": "^2.0.5",
|
|
85
|
+
"fs-extra": "^11.1.0",
|
|
86
86
|
"google-libphonenumber": "^3.2.31",
|
|
87
87
|
"htmlparser2-without-node-native": "^3.9.2",
|
|
88
88
|
"mongo-parse": "^2.1.0",
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**@see : https://blog.shahednasser.com/how-to-create-a-npx-tool/ */
|
|
3
|
-
'use strict';
|
|
4
|
-
process.on('unhandledRejection', err => {
|
|
5
|
-
throw err;
|
|
6
|
-
});
|
|
7
|
-
const spawnAsync = require('cross-spawn').spawn;
|
|
8
|
-
const { realpathSync } = require('fs-extra');
|
|
9
|
-
|
|
10
|
-
//const { ensureMinProjectSetupAsync } = require('../build/Config');
|
|
11
|
-
|
|
12
|
-
const args = process.argv.slice(2);
|
|
13
|
-
|
|
14
|
-
const scriptIndex = args.findIndex(x => x === 'start' || x === 'customize');
|
|
15
|
-
const script = scriptIndex === -1 ? args[0] : args[scriptIndex];
|
|
16
|
-
const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];
|
|
17
|
-
console.log(args," is argggggg",script);
|
|
18
|
-
if (['start', 'customize'].includes(script)) {
|
|
19
|
-
spawnAsync(
|
|
20
|
-
'node',
|
|
21
|
-
nodeArgs.concat(require.resolve('./scripts/' + script)).concat(args.slice(scriptIndex + 1)),
|
|
22
|
-
{ stdio: 'inherit' }
|
|
23
|
-
).then(result => {
|
|
24
|
-
if (result.signal) {
|
|
25
|
-
if (result.signal === 'SIGKILL') {
|
|
26
|
-
console.log(
|
|
27
|
-
'The build failed because the process exited too early. ' +
|
|
28
|
-
'This probably means the system ran out of memory or someone called ' +
|
|
29
|
-
'`kill -9` on the process.'
|
|
30
|
-
);
|
|
31
|
-
} else if (result.signal === 'SIGTERM') {
|
|
32
|
-
console.log(
|
|
33
|
-
'The build failed because the process exited too early. ' +
|
|
34
|
-
'Someone might have called `kill` or `killall`, or the system could ' +
|
|
35
|
-
'be shutting down.'
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
|
-
process.exit(result.status);
|
|
41
|
-
});
|
|
42
|
-
} else if (script === undefined) {
|
|
43
|
-
const projectRoot = realpathSync(process.cwd());
|
|
44
|
-
|
|
45
|
-
//ensureMinProjectSetupAsync(projectRoot);
|
|
46
|
-
} else {
|
|
47
|
-
console.log('Invalid command "' + script + '".');
|
|
48
|
-
}
|
package/bin/electron/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**@see : https://blog.shahednasser.com/how-to-create-a-npx-tool/ */
|
|
3
|
-
'use strict';
|
|
4
|
-
process.on('unhandledRejection', err => {
|
|
5
|
-
throw err;
|
|
6
|
-
});
|
|
7
|
-
const args = process.argv.slice(2);
|
|
8
|
-
|
|
9
|
-
console.log(args," is arggggg");
|
|
10
|
-
|
|
11
|
-
process.exist();
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const chalk = require('chalk');
|
|
2
|
-
const fs = require('fs-extra');
|
|
3
|
-
|
|
4
|
-
const { copyTemplateToProject, ensureMinProjectSetupAsync } = require('..');
|
|
5
|
-
process.on('unhandledRejection', err => {
|
|
6
|
-
throw err;
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const projectRoot = fs.realpathSync(process.cwd());
|
|
10
|
-
|
|
11
|
-
console.log();
|
|
12
|
-
console.log(chalk.magenta('\u203A Copying Expo Electron main process to local project...'));
|
|
13
|
-
|
|
14
|
-
copyTemplateToProject(projectRoot);
|
|
15
|
-
ensureMinProjectSetupAsync(projectRoot);
|
|
16
|
-
|
|
17
|
-
console.log(
|
|
18
|
-
chalk.magenta(
|
|
19
|
-
'\u203A You can now edit the Electron main process in the `electron/main` folder of your project...'
|
|
20
|
-
)
|
|
21
|
-
);
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**@see : https://www.npmjs.com/package/@expo/webpack-config/v/0.11.4 */
|
|
2
|
-
const createExpoWebpackConfigAsync = require('@expo/webpack-config')
|
|
3
|
-
const path = require("path");
|
|
4
|
-
const isObj = x => x && typeof x =='object' && !Array.isArray(x);
|
|
5
|
-
// Expo CLI will await this method so you can optionally return a promise.
|
|
6
|
-
module.exports = async function(env, argv,opts) {
|
|
7
|
-
const dir = path.resolve(__dirname);
|
|
8
|
-
env = env || {};
|
|
9
|
-
opts = typeof opts =="object" && opts ? opts : {};
|
|
10
|
-
const babel = isObj(opts.babel)? opts.babel : {};
|
|
11
|
-
const isElectron = typeof env.platform =="string" && env.platform.toLowerCase().trim() ==='electron';
|
|
12
|
-
if(isElectron){
|
|
13
|
-
env.platform = "electron";
|
|
14
|
-
env.mode = env.mode =="production" && "production" || "development";
|
|
15
|
-
env.pwa = false;
|
|
16
|
-
}
|
|
17
|
-
const transpileModules = Array.isArray(opts.transpileModules)? opts.transpileModules : [];
|
|
18
|
-
const config = await createExpoWebpackConfigAsync(
|
|
19
|
-
{
|
|
20
|
-
...env,
|
|
21
|
-
babel: {
|
|
22
|
-
...babel,
|
|
23
|
-
dangerouslyAddModulePathsToTranspile: [
|
|
24
|
-
// Ensure that all packages starting with @fto-consult are transpiled.
|
|
25
|
-
'@fto-consult',
|
|
26
|
-
...transpileModules,
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
argv
|
|
31
|
-
);
|
|
32
|
-
config.module.rules.push(
|
|
33
|
-
{
|
|
34
|
-
test: /.mjs$/,
|
|
35
|
-
include: /node_modules/,
|
|
36
|
-
include: /node_modules/,
|
|
37
|
-
type: "javascript/auto",
|
|
38
|
-
use: {loader: 'babel-loader'}
|
|
39
|
-
});
|
|
40
|
-
//config.resolve.alias['moduleA'] = 'moduleB';
|
|
41
|
-
config.mode = (config.mode =="development" || config.mode =='production') ? config.mode : "development";
|
|
42
|
-
// Maybe you want to turn off compression in dev mode.
|
|
43
|
-
if (config.mode === 'development') {
|
|
44
|
-
config.devServer.compress = false;
|
|
45
|
-
}
|
|
46
|
-
// Or prevent minimizing the bundle when you build.
|
|
47
|
-
if (config.mode === 'production') {
|
|
48
|
-
config.optimization.minimize = true;
|
|
49
|
-
}
|
|
50
|
-
config.performance = typeof config.performance =="object" && config.performance ? config.performance : {};
|
|
51
|
-
config.performance.hints = "hints" in config.performance ? config.performance.hints : false;
|
|
52
|
-
config.performance.maxEntrypointSize = typeof config.performance.maxEntrypointSize =='number'? config.performance.maxEntrypointSize : 512000;
|
|
53
|
-
config.performance.maxAssetSize = typeof config.performance.maxAssetSize =='number'? config.performance.maxAssetSize : 512000;
|
|
54
|
-
config.devtool = (config.mode === 'development') ? 'inline-source-map' : false;
|
|
55
|
-
require("./compiler.config.js")({config,...opts,dir});
|
|
56
|
-
if(isElectron){
|
|
57
|
-
const electronPath = process.cwd();
|
|
58
|
-
config.output = config.output || {};
|
|
59
|
-
config.output.publicPath = "./";
|
|
60
|
-
config.output.path = path.join(electronPath,"dist");
|
|
61
|
-
if(isObj(config.node)){
|
|
62
|
-
config.resolve.fallback = isObj(config.resolve.fallback)? config.resolve.fallback : {};
|
|
63
|
-
for(let i in config.node){
|
|
64
|
-
if(config.node[i] =="empty"){
|
|
65
|
-
config.resolve.fallback[i] = false;
|
|
66
|
-
} else config.resolve.fallback[i] = config.node[i];
|
|
67
|
-
delete config.node[i];
|
|
68
|
-
}
|
|
69
|
-
config.resolve.byDependency = {
|
|
70
|
-
// ...
|
|
71
|
-
esm: {
|
|
72
|
-
mainFields: ['browser', 'module'],
|
|
73
|
-
},
|
|
74
|
-
commonjs: {
|
|
75
|
-
aliasFields: ['browser'],
|
|
76
|
-
},
|
|
77
|
-
url: {
|
|
78
|
-
preferRelative: true,
|
|
79
|
-
},
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return config;
|
|
84
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
|
|
2
|
-
const envManager = require("@expo/webpack-config/env");
|
|
3
|
-
const addons = require("@expo/webpack-config/addons");
|
|
4
|
-
const jsonfile = require('jsonfile');
|
|
5
|
-
const path = require("path");
|
|
6
|
-
const mode = 'development';
|
|
7
|
-
const isObj = x => x && typeof x =='object' && !Array.isArray(x);
|
|
8
|
-
/***@see : https://www.npmjs.com/package/@expo/webpack-config */
|
|
9
|
-
module.exports = async function(env, argv) {
|
|
10
|
-
const projectRoot = process.cwd()
|
|
11
|
-
const electronPath = path.join(projectRoot,'electron');
|
|
12
|
-
env = env || {};
|
|
13
|
-
env.projectRoot = projectRoot;
|
|
14
|
-
env.platform = "electron";//isObj(env.platform)? env.platform : {};//'web'///electron;
|
|
15
|
-
//env.platform.type = "electron";
|
|
16
|
-
env.locations = (0, envManager.getPaths)(projectRoot)
|
|
17
|
-
env.pwa = false;
|
|
18
|
-
let config = (0, addons.withAlias)({}, (0, envManager.getAliases)(projectRoot));
|
|
19
|
-
if(argv && typeof argv =='object' && (argv.mode =='production' || argv.mode =="development")){
|
|
20
|
-
env.mode = argv.mode;
|
|
21
|
-
} else {
|
|
22
|
-
env.mode = mode;
|
|
23
|
-
}
|
|
24
|
-
config = await createExpoWebpackConfigAsync(env, argv);
|
|
25
|
-
config.output = config.output || {};
|
|
26
|
-
config.output.publicPath = "./";
|
|
27
|
-
config.output.path = path.join(electronPath,"dist");
|
|
28
|
-
if (!config.plugins) config.plugins = [];
|
|
29
|
-
if (!config.resolve) config.resolve = {};
|
|
30
|
-
for(let i in config.plugins){
|
|
31
|
-
let pl = config.plugins[i];
|
|
32
|
-
//on recherche le fichier html build de webpack
|
|
33
|
-
if(pl && typeof pl =='object' && pl.options && typeof pl.options =='object'){
|
|
34
|
-
if(typeof pl.options.filename =="string" && pl.options.filename.toLowerCase().includes("index.html")){
|
|
35
|
-
pl.options.filename = path.join(config.output.path,"index.html");
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
//console.log(config.resolve.extensions, "is r extensions")
|
|
41
|
-
config.resolve.extensions = (0, envManager.getModuleFileExtensions)('electron', 'web');
|
|
42
|
-
//jsonfile.writeFileSync("electron/config.back.json", config, {spaces: 4});
|
|
43
|
-
console.log("******electron config file generated**********");
|
|
44
|
-
return config;
|
|
45
|
-
};
|
package/is-os-case-sensitive.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// Copyright 2022 @fto-consult/Boris Fouomene. All rights reserved.
|
|
2
|
-
// Use of this source code is governed by a BSD-style
|
|
3
|
-
// license that can be found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
const path = require("path");
|
|
6
|
-
const dir = path.resolve(__dirname);
|
|
7
|
-
const fs = require("fs");
|
|
8
|
-
|
|
9
|
-
/*** check weather os is case sensitive
|
|
10
|
-
* @see : https://stackoverflow.com/questions/27367261/check-if-file-exists-case-sensitive/52908385#52908385
|
|
11
|
-
*/
|
|
12
|
-
function fileExistsWithCaseSync(filepath) {
|
|
13
|
-
var dir = path.dirname(filepath);
|
|
14
|
-
if (dir === '/' || dir === '.') return true;
|
|
15
|
-
var filenames = fs.readdirSync(dir);
|
|
16
|
-
if (filenames.indexOf(path.basename(filepath)) === -1) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
return fileExistsWithCaseSync(dir);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/***vérifie si le système supporte la cassse où non
|
|
23
|
-
* c'est à dire si 2 noms de fichiers ayant la case différentes sont considérés comme le même où pas
|
|
24
|
-
*/
|
|
25
|
-
module.exports = (()=>{
|
|
26
|
-
return fileExistsWithCaseSync(path.resolve(dir,"metro.config.js")) == fileExistsWithCaseSync(path.resolve(dir,"Metro.config.js"))
|
|
27
|
-
})();
|
package/writeFile.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
|
-
const getDirName = require('path').dirname;
|
|
3
|
-
module.exports = function writeFile(path, contents, cb) {
|
|
4
|
-
const p = getDirName(path);
|
|
5
|
-
if(!fs.existsSync(p)){
|
|
6
|
-
try {
|
|
7
|
-
fs.mkdirSync(p,{ recursive: true});
|
|
8
|
-
} catch(e){
|
|
9
|
-
console.log(e," making write file directory")
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
if(fs.existsSync(p)){
|
|
13
|
-
return fs.writeFileSync(path, contents, cb);
|
|
14
|
-
}
|
|
15
|
-
throw {message : 'impossible de créer le repertoire '+p};
|
|
16
|
-
}
|