@codemoreira/esad 1.4.6-9 → 2.0.0-rc.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 +82 -96
- package/bin/esad.js +88 -114
- package/package.json +13 -13
- package/src/cli/commands/build.js +20 -25
- package/src/cli/commands/createCdn.js +44 -45
- package/src/cli/commands/createModule.js +5 -2
- package/src/cli/commands/deploy.js +80 -118
- package/src/cli/commands/dev.js +43 -103
- package/src/cli/commands/host.js +15 -18
- package/src/cli/commands/init.js +33 -14
- package/src/cli/utils/config.js +40 -37
- package/src/cli/utils/process.js +66 -21
- package/src/cli/utils/scaffold.js +96 -112
- package/src/cli/utils/transformer.js +44 -0
- package/src/client/index.js +69 -82
- package/src/plugin/index.js +70 -37
- package/src/plugin/config-plugin.js +0 -45
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const { withAppBuildGradle, withXcodeProject } = require('expo/config-plugins');
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* ESAD Re.Pack Config Plugin
|
|
5
|
-
*
|
|
6
|
-
* Automates the native patching required for Re.Pack/Rspack to work with Expo.
|
|
7
|
-
* Replaces manual patching in ESAD CLI.
|
|
8
|
-
*/
|
|
9
|
-
module.exports = (config) => {
|
|
10
|
-
// --- iOS Patching ---
|
|
11
|
-
config = withXcodeProject(config, (configuration) => {
|
|
12
|
-
const xcodeProject = configuration.modResults;
|
|
13
|
-
const bundleReactNativeCodeAndImagesBuildPhase = xcodeProject.buildPhaseObject(
|
|
14
|
-
'PBXShellScriptBuildPhase',
|
|
15
|
-
'Bundle React Native code and images'
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
if (bundleReactNativeCodeAndImagesBuildPhase) {
|
|
19
|
-
const script = JSON.parse(bundleReactNativeCodeAndImagesBuildPhase.shellScript);
|
|
20
|
-
const patched = script
|
|
21
|
-
.replace(
|
|
22
|
-
/if \[\[ -z "\$CLI_PATH" \]\]; then[\s\S]*?fi\n?/g,
|
|
23
|
-
`export CLI_PATH="$("$NODE_BINARY" --print "require('path').dirname(require.resolve('@react-native-community/cli/package.json')) + '/build/bin.js'")"`
|
|
24
|
-
)
|
|
25
|
-
.replace(/if \[\[ -z "\$BUNDLE_COMMAND" \]\]; then[\s\S]*?fi\n?/g, '');
|
|
26
|
-
|
|
27
|
-
bundleReactNativeCodeAndImagesBuildPhase.shellScript = JSON.stringify(patched);
|
|
28
|
-
}
|
|
29
|
-
return configuration;
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// --- Android Patching ---
|
|
33
|
-
config = withAppBuildGradle(config, (configuration) => {
|
|
34
|
-
const buildGradle = configuration.modResults.contents;
|
|
35
|
-
// Ensure Re.Pack bundle command is used
|
|
36
|
-
const patched = buildGradle
|
|
37
|
-
.replace(/cliFile.*/, '')
|
|
38
|
-
.replace(/bundleCommand.*/, 'bundleCommand = "bundle"');
|
|
39
|
-
|
|
40
|
-
configuration.modResults.contents = patched;
|
|
41
|
-
return configuration;
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
return config;
|
|
45
|
-
};
|