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
{{ message }}
This repository was archived by the owner on Nov 2, 2024. It is now read-only.
This plugin handles common operations for Drupal setups. This is derived from the Drupal code base itself and also other projects.
8
+
This plugin provides a new composer command (`drupal-init`) which helps in creating new Drupal installations based on composer. Most of the options are very similar to the default `composer init` command. There are additional options to specify a Drupal core or distro to use and the docroot.
9
+
10
+
This plugin also supports Drupal 7 installation but this option needs to be passed in from command line.
9
11
10
12
## Installation
11
13
14
+
Since this plugin provides a new composer command that should be used in an empty directory (or at least a directory without a composer.json setup), this has to be installed globally.
15
+
12
16
```
13
17
composer global require hussainweb/drupal-composer-init:~1.0
14
18
```
15
19
20
+
## Updating
21
+
22
+
```
23
+
composer global update hussainweb/drupal-composer-init --with-dependencies
24
+
```
25
+
16
26
## Usage
17
27
18
28
In a fresh directory, run this command to get started.
@@ -21,6 +31,71 @@ In a fresh directory, run this command to get started.
21
31
composer drupal-init
22
32
```
23
33
34
+
To intialise a Drupal 7 website, run the following command:
Drupal extensions such as modules, themes, and profiles can be specified in the regular `require` or `require-dev` section of composer.json schema.
43
+
44
+
All Drupal extensions can be specified in the regular packages section with their drupal.org name prefixed by '`drupal/`'. For example, if you want to require panels module, specify `drupal/panels`.
45
+
46
+
```
47
+
Define your dependencies.
48
+
49
+
Would you like to define your dependencies (require) now [yes]?
50
+
Search for a package: drupal/panels
51
+
Enter the version constraint to require (or leave blank to use the latest version):
52
+
Using version ^4.2 for drupal/panels
53
+
Search for a package: drupal/redirect
54
+
Enter the version constraint to require (or leave blank to use the latest version):
55
+
Using version ^1.0@beta for drupal/redirect
56
+
Search for a package:
57
+
```
58
+
59
+
### Additional Help
60
+
24
61
Run `composer help drupal-init` for more options.
25
62
26
-
More details coming soon...
63
+
```
64
+
Usage:
65
+
drupal-init [options]
66
+
67
+
Options:
68
+
--name=NAME Name of the package
69
+
--description=DESCRIPTION Description of package
70
+
--author=AUTHOR Author name of package
71
+
--type[=TYPE] Type of package (e.g. library, project, metapackage, composer-plugin) [default: "project"]
72
+
--homepage=HOMEPAGE Homepage of package
73
+
--require=REQUIRE Package to require with a version constraint, e.g. foo/bar:1.0.0 or foo/bar=1.0.0 or "foo/bar 1.0.0" (multiple values allowed)
74
+
--require-dev=REQUIRE-DEV Package to require for development with a version constraint, e.g. foo/bar:1.0.0 or foo/bar=1.0.0 or "foo/bar 1.0.0" (multiple values allowed)
75
+
-c, --core=CORE Drupal Core or distribution, e.g. drupal/core or acquia/lightning [default: "drupal/core"]
76
+
-s, --stability=STABILITY Minimum stability (empty or one of: stable, RC, beta, alpha, dev)
77
+
-l, --license=LICENSE License of package
78
+
--repository=REPOSITORY Add custom repositories, either by URL or using JSON arrays (multiple values allowed)
79
+
-w, --web-dir=WEB-DIR Specify the docroot (defaults to web) [default: "web"]
80
+
--drupal-7 Use Drupal 7 packagist instead of Drupal 8
81
+
-h, --help Display this help message
82
+
-q, --quiet Do not output any message
83
+
-V, --version Display this application version
84
+
--ansi Force ANSI output
85
+
--no-ansi Disable ANSI output
86
+
-n, --no-interaction Do not ask any interactive question
87
+
--profile Display timing and memory usage information
88
+
--no-plugins Whether to disable plugins.
89
+
-d, --working-dir=WORKING-DIR If specified, use the given directory as working directory.
90
+
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
91
+
92
+
Help:
93
+
The drupal-init command creates a composer.json file
94
+
usable for Drupal projects in the current directory.
95
+
96
+
php composer.phar drupal-init
97
+
```
98
+
99
+
## Contributing
100
+
101
+
Contributions are welcome. Please use the issue queue to describe the problem. Pull requests are welcome.
0 commit comments