@swell/cli 2.0.3 → 2.0.5
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.
|
@@ -92,13 +92,11 @@ export default class AppThemeDev extends PushAppCommand {
|
|
|
92
92
|
console.error('No scripts found in package.json. Try adding scripts to your package file.');
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (!scriptName) {
|
|
98
|
-
console.warn('Neither "dev" nor "watch" scripts found in package.json');
|
|
95
|
+
if (!packageJson.scripts.bundle) {
|
|
96
|
+
console.warn('"bundle" script not found in package.json');
|
|
99
97
|
return;
|
|
100
98
|
}
|
|
101
|
-
const childProcess = spawn('npm', ['run',
|
|
99
|
+
const childProcess = spawn('npm', ['run', 'bundle'], {
|
|
102
100
|
env: { ...process.env, BROWSERSLIST_IGNORE_OLD_DATA: 'true' },
|
|
103
101
|
shell: true,
|
|
104
102
|
stdio: 'pipe',
|
|
@@ -108,16 +106,16 @@ export default class AppThemeDev extends PushAppCommand {
|
|
|
108
106
|
for (const line of lines) {
|
|
109
107
|
const trimmedLine = line.trim();
|
|
110
108
|
if (trimmedLine) {
|
|
111
|
-
console.log(
|
|
109
|
+
console.log(trimmedLine);
|
|
112
110
|
}
|
|
113
111
|
}
|
|
114
112
|
});
|
|
115
113
|
childProcess.on('exit', (code) => {
|
|
116
114
|
if (code === 0) {
|
|
117
|
-
console.log(
|
|
115
|
+
console.log(`bundle completed successfully.`);
|
|
118
116
|
}
|
|
119
117
|
else {
|
|
120
|
-
console.error(
|
|
118
|
+
console.error(`bundle exited with code ${code}.`);
|
|
121
119
|
}
|
|
122
120
|
});
|
|
123
121
|
}
|
package/dist/lib/apps/index.js
CHANGED
|
@@ -206,13 +206,11 @@ function appAssetImage(appPath, fileName) {
|
|
|
206
206
|
}
|
|
207
207
|
function appConfigFromFile(filePath, configType, appPath) {
|
|
208
208
|
const { name } = path.parse(filePath);
|
|
209
|
-
// Nested files are considered 'file' type
|
|
210
|
-
const type = (filePath.split(path.sep).length > 2 ? 'file' : configType || 'file');
|
|
211
209
|
const config = AppConfig.create({
|
|
212
210
|
name,
|
|
213
211
|
filePath,
|
|
214
212
|
appPath,
|
|
215
|
-
type,
|
|
213
|
+
type: configType,
|
|
216
214
|
file_path: filePath,
|
|
217
215
|
});
|
|
218
216
|
// Do not allow files larger than 10MB
|
package/oclif.manifest.json
CHANGED