@sleeperhq/mini-core 1.4.10 → 1.5.2
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/bin/build_mini.js +5 -2
- package/package.json +1 -1
package/bin/build_mini.js
CHANGED
|
@@ -32,7 +32,7 @@ const getCommands = (projectName) => {
|
|
|
32
32
|
const zip = isWindows ?
|
|
33
33
|
`powershell Compress-Archive -Path "${distPath}" -DestinationPath "${zipFilePath}"` :
|
|
34
34
|
`cd dist && zip -r "${projectName}.zip" * && cd -`;
|
|
35
|
-
const openFile = isWindows ? `start
|
|
35
|
+
const openFile = isWindows ? `start dist` : `open dist`;
|
|
36
36
|
const cleanIndex = `${removeDir} "${bundleOutputPath["ios"]}" "${bundleOutputPath["android"]}" "${sourcemapOutputPath["ios"]}" "${sourcemapOutputPath["android"]}"`;
|
|
37
37
|
const cleanAll = `${removeDir} dist node_modules`;
|
|
38
38
|
const cleanBuild = `${removeDir} "${distPath}" "${assetsDestPath["ios"]}" "${assetsDestPath["android"]}"`;
|
|
@@ -139,7 +139,7 @@ const validateProjectName = (name) => {
|
|
|
139
139
|
const main = async () => {
|
|
140
140
|
// Enter project name.
|
|
141
141
|
const fallback = getProjectName();
|
|
142
|
-
const projectName = await getInput("Enter project name: ", fallback);
|
|
142
|
+
const projectName = await getInput("Enter project name (return to skip): ", fallback);
|
|
143
143
|
if (!validateProjectName(projectName)) {
|
|
144
144
|
printError("Invalid project name. Only alphanumeric characters and underscores are allowed.");
|
|
145
145
|
process.exit(1);
|
|
@@ -168,6 +168,9 @@ const main = async () => {
|
|
|
168
168
|
await spawnProcess(commands.bundleAndroid, "webpack-bundle android command exited with non-zero code");
|
|
169
169
|
printComplete("Android build complete.");
|
|
170
170
|
|
|
171
|
+
// Copy the app.json file to the dist folder
|
|
172
|
+
fs.copyFileSync('app.json', path.join('dist', projectName, 'app.json'));
|
|
173
|
+
|
|
171
174
|
// Create Zip Archive
|
|
172
175
|
printInfo("Creating zip archive...");
|
|
173
176
|
await spawnProcess(commands.cleanIndex, "clean command exited with non-zero code");
|