wp-lemon-create 1.4.6 → 1.5.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/lib/index.js +19 -5
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -127,7 +127,7 @@ program
|
|
|
127
127
|
shell.echo(`🎉 Setting up ${project_type} wp-lemon project with url ${project_url} \n`);
|
|
128
128
|
|
|
129
129
|
if (project_type == 'new') {
|
|
130
|
-
shell.echo('Downloading Bedrock. This may take a minute or so.\n');
|
|
130
|
+
shell.echo('⏳ Downloading Bedrock. This may take a minute or so.\n');
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* cloning bedrock and removing unneeded dirs
|
|
@@ -151,7 +151,7 @@ program
|
|
|
151
151
|
/**
|
|
152
152
|
* Add composer packages
|
|
153
153
|
*/
|
|
154
|
-
shell.echo('Installing plugins,
|
|
154
|
+
shell.echo('⏳ Installing plugins, parent theme and packages. This may take a while\n');
|
|
155
155
|
|
|
156
156
|
shell.exec('composer require composer/installers ~1.0', { silent: true });
|
|
157
157
|
|
|
@@ -201,7 +201,7 @@ program
|
|
|
201
201
|
/**
|
|
202
202
|
* Downloading child theme
|
|
203
203
|
*/
|
|
204
|
-
shell.echo('Downloading child theme.\n');
|
|
204
|
+
shell.echo('⏳ Downloading child theme.\n');
|
|
205
205
|
shell.cd('web/app/themes/');
|
|
206
206
|
|
|
207
207
|
shell.exec(`composer create-project --repository https://packagist.studiolemon.nl/satispress/ satispress/wp-lemon-child ${child_theme_folder} --no-dev`, { silent: true });
|
|
@@ -244,7 +244,7 @@ program
|
|
|
244
244
|
/**
|
|
245
245
|
* Installing node modules in child theme and parent theme.
|
|
246
246
|
*/
|
|
247
|
-
shell.echo('Installing npm dependencies. This may take a while.\n');
|
|
247
|
+
shell.echo('⏳ Installing npm dependencies. This may take a while.\n');
|
|
248
248
|
if (shell.exec(`yarn run bootstrap-project`, { silent: true }).code !== 0) {
|
|
249
249
|
shell.echo('Error: yarn run bootstrap-project failed. Please install node dependencies manually by running yarn run bootstrap-project in your child theme.');
|
|
250
250
|
} else {
|
|
@@ -263,6 +263,20 @@ program
|
|
|
263
263
|
*/
|
|
264
264
|
shell.cd('../../../../');
|
|
265
265
|
|
|
266
|
+
shell.exec(`touch ${project_name}.code-workspace`);
|
|
267
|
+
shell.exec(`echo '{
|
|
268
|
+
"folders": [
|
|
269
|
+
{
|
|
270
|
+
"path": "."
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"path": "web/app/themes/${project_name}"
|
|
274
|
+
}
|
|
275
|
+
]
|
|
276
|
+
}' >> ${project_name}.code-workspace`);
|
|
277
|
+
shell.echo('✔️ .code-workspace file created.\n');
|
|
278
|
+
|
|
279
|
+
|
|
266
280
|
/**
|
|
267
281
|
* reload host file so browsersync works without a restart.
|
|
268
282
|
*/
|
|
@@ -289,7 +303,7 @@ program
|
|
|
289
303
|
}
|
|
290
304
|
|
|
291
305
|
if (project_type == 'new') {
|
|
292
|
-
shell.echo('Installing WordPress.\n');
|
|
306
|
+
shell.echo('⏳ Installing WordPress.\n');
|
|
293
307
|
|
|
294
308
|
if (shell.exec(`wp db create`, { silent: true }).code !== 0) {
|
|
295
309
|
shell.echo('Database creation failed.');
|