You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are custom commands used to build a site. The information about the site comes from ~/.console/sites/site-name.yml.
15
15
e.g. https://raw.githubusercontent.com/dennisinteractive/drupal_console_commands/master/example/site-example.yml
16
16
17
17
- drupal **site:new**
18
18
Builds a new site using Drupal project as template https://github.com/dennisinteractive/drupal-project
19
-
- drupal **site:checkout***site-mame* --
19
+
20
+
- drupal **site:checkout***site-name*
20
21
Performs a git clone and checks out the specified branch
22
+
21
23
- drupal **site:compose***site-name*
22
-
Runs *composer install*. Alternatively, it will run *composer update* if there is a composer.lock.
24
+
Runs *composer*
25
+
26
+
- drupal **site:npm****site:new**
27
+
Runs NPM
28
+
29
+
- drupal **site:grunt****site:new**
30
+
Runs Grunt
31
+
23
32
- drupal **site:settings:db***site-name*
24
33
Creates *settings.db.php* in the *web/sites/default* folder. This file contains DB credentials and should not be committed.
34
+
25
35
- drupal **site:settings:local***site-name*
26
36
Creates *settings.local.php* in the *web/sites/default* folder. This file contains local settings overrides and should not be committed.
37
+
27
38
- drupal **site:settings:memcache***site-name*
28
39
Creates *settings.memcache.php* in the *web/sites/default* folder. This file contains Memcache configuration and should not be committed.
40
+
41
+
- drupal **site:drush:alias***site-name*
42
+
Sets up drush aliases
43
+
29
44
- drupal **site:phpunit:setup***site-name*
30
45
Creates *phpunit.xml* in the root. This file contains PHPUnit configuration and should not be committed.
46
+
31
47
- drupal **site:behat:setup***site-name*
32
48
Creates *behat.yml* in the *tests* folder. This file contains Behat configuration and should not be committed.
49
+
33
50
- drupal **site:db:import***site-name*
34
51
If a database dump is available, it will drop the current database and import the dump. The db-dump information comes from *~/.console/sites/site-name.yml*.
35
52
The command will copy the dump from the original place to */tmp*. If you run the command again, it will only copy the file once the original has changed. This is very useful when working remotely on slow networks.
36
53
If no db-dump information is available or there is no dump at the location, it will run a site install.
37
54
Supported extensions: **.sql**, **.sql.gz**.
38
-
- drupal **site:build**
39
-
A chain that will call all the commands below:
40
-
- site:checkout
41
-
- site:rebuild
42
-
- drupal **site:rebuild**
43
-
A chain that will call all the commands below:
44
-
- site:compile
45
-
- site:configure
46
-
- site:db:import
47
-
- site:construct
48
-
- drupal **site:rebuild-prod**
49
-
A chain that will call all the commands below:
50
-
- site:compile
51
-
- site:construct
52
-
- drupal **site:compile**
53
-
A chain that will call all the commands below:
54
-
- site:compose
55
-
- 'exec' command that runs npm in supported directories.
56
-
- 'exec' command that runs grunt in supported directories.
57
-
- drupal **site:configure**
58
-
A chain that will call all the commands below:
55
+
56
+
## Chains
57
+
Chains that can be reused on various environments
58
+
59
+
- drupal **site:configure** A chain that will call all the commands below:
59
60
- site:settings:db
60
61
- site:settings:local
61
62
- site:settings:memcache
62
-
- drupal **site:construct**
63
-
A chain that will call all the commands below:
64
-
- 'exec' command that clears drupal caches.
65
-
- 'exec' command that sets drush aliases.
66
-
- 'exec' command that runs drupal updates.
67
-
- 'exec' command that imports drupal config twice.
68
-
- 'exec' command that clears drupal caches.
69
-
- drupal **site:test**
70
-
A chain that will call all the commands below:
63
+
- site:drush:alias
64
+
65
+
- drupal **site:update** Used to run updates and import configuration
66
+
- drush cr (Clear caches)
67
+
- drush site-set @site (Set default drush alias)
68
+
- drush updb (Runs updates)
69
+
- drush cim (Imports configuration)
70
+
- drush cr (Clear caches)
71
+
72
+
- drupal **site:test:setup** Sets the test suites
71
73
- site:phpunit:setup
72
74
- site:behat:setup
73
-
- 'exec' command that runs behat tests.
74
-
- 'exec' command that runs phpunit tests.
75
75
76
-
# Useful arguments and options
76
+
- drupal **site:test** Runs test suites
77
+
- site:test:setup
78
+
- behat (Runs behat tests)
79
+
- phpunit (Runs phpunit tests)
80
+
81
+
## Environment specific chains
82
+
Each environment will have its own chain that executes the relevant commands and chains
83
+
84
+
### Dev
85
+
- drupal **site:build** Builds a site for development
86
+
- site:checkout
87
+
- site:rebuild (chain)
88
+
89
+
- drupal **site:rebuild** Performs necessary steps to rebuild the site from a given source
90
+
- site:compose
91
+
- site:npm
92
+
- site:grunt
93
+
- site:configure (chain)
94
+
- site:test:setup (chain)
95
+
- site:db:import
96
+
- site:update (chain)
97
+
98
+
### Artifact
99
+
- drupal **site:build** Builds a site for artifacts
0 commit comments