diff --git a/docs/book/index.html b/docs/book/index.html deleted file mode 100644 index 49298c4..0000000 --- a/docs/book/index.html +++ /dev/null @@ -1,96 +0,0 @@ -
-
-

laminas-skeleton-installer

- -

Composer plugin for providing and prompting for optional components in skeleton projects.

- -
$ composer require laminas/laminas-skeleton-installer
-
-
- -
-
-
-

Optional Packages

- -

- To define an optional package, you will add an object under a - `extra.laminas-skeleton-installer` array in your `composer.json`. The - object **must** contain the following properties: -

- -
    -
  • name: the name of the package to install
  • -
  • constraint: the package constraint to use
  • -
  • prompt: a textual prompt (e.g., "Do you want to install - console tooling?"
  • -
- -

- You may also define two boolean flags: -

- -
    -
  • module: when true, indicates that the component represents a - Laminas module. This flag will not dictate whether or not the - component installer prompts to install the package as a module, but - will affect hints provided by Composer during installation.
  • -
  • dev: when true, indicates the package should be installed as - a development requirement (require-dev). Additionally, - the installer will prompt you to choose a development configuration - file in which to install the component if it is a module.
  • -
-
- -
-

Example

- -

-{
-  "name": "laminas/laminas-skeleton-application",
-  "type": "project",
-  "require": {
-    "php": "^5.6 || ^7.0",
-    "laminas/laminas-component-installer": "^1.0 || ^0.7 || ^1.0.0-dev@dev",
-    "laminas/laminas-skeleton-installer": "^1.0 || ^0.1.3 || ^1.0.0-dev@dev",
-    "laminas/laminas-mvc": "^3.0.4"
-  },
-  "extra": {
-    "laminas-skeleton-installer": [
-      {
-        "name": "laminas/laminas-mvc-console",
-        "constraint": "^1.1.11",
-        "prompt": "Would you like to install MVC console tooling?",
-        "module": true
-      },
-      {
-        "name": "laminas/laminas-mvc-i18n",
-        "constraint": "^1.0",
-        "prompt": "Would you like to install i18n support?",
-        "module": true
-      },
-      {
-        "name": "laminas/laminas-test",
-        "constraint": "^3.0.2",
-        "prompt": "Would you like to install MVC testing support?",
-        "dev": true
-      }
-    ]
-  }
-}
-      
- -

The above will:

- -
    -
  • Prompt if you want to do a minimal install; if so, the plugin will remove - the extra.laminas-skeleton-installer section on completion, - and then delete itself from the installation.
  • -
  • Prompt for each of the listed components, as noted, awaiting a y/N - answer (with "n" as the default).
  • -
  • Install the selections, updating the composer.json.
  • -
  • Remove itself from the installation on completion.
  • -
-
-
-
diff --git a/docs/book/index.md b/docs/book/index.md deleted file mode 120000 index fe84005..0000000 --- a/docs/book/index.md +++ /dev/null @@ -1 +0,0 @@ -../../README.md \ No newline at end of file diff --git a/docs/book/index.md b/docs/book/index.md new file mode 100644 index 0000000..b35e94a --- /dev/null +++ b/docs/book/index.md @@ -0,0 +1,73 @@ +# Installation + +```bash +$ composer require laminas/laminas-skeleton-installer +``` + +## Optional Packages + +To define an optional package, you will add an object under a +`extra.laminas-skeleton-installer` array in your `composer.json`. The +object **must** contain the following properties: + +* **name**: the name of the package to install +* **constraint**: the package constraint to use +* **prompt**: a textual prompt (e.g., "Do you want to install console tooling?" + +You may also define two boolean flags: + +* **module**: when true, indicates that the component represents a Laminas + module. This flag will not dictate whether or not the component installer + prompts to install the package as a module, but will affect hints provided by + Composer during installation. +* **dev**: when true, indicates the package should be installed as a development + requirement (`require-dev`). Additionally, the installer will prompt you to + choose a development configuration file in which to install the component if + it is a module. + +## Example + +```json +{ + "name": "laminas/laminas-skeleton-application", + "type": "project", + "require": { + "php": "^5.6 || ^7.0", + "laminas/laminas-component-installer": "^1.0 || ^0.7 || ^1.0.0-dev@dev", + "laminas/laminas-skeleton-installer": "^1.0 || ^0.1.3 || ^1.0.0-dev@dev", + "laminas/laminas-mvc": "^3.0.4" + }, + "extra": { + "laminas-skeleton-installer": [ + { + "name": "laminas/laminas-mvc-console", + "constraint": "^1.1.11", + "prompt": "Would you like to install MVC console tooling?", + "module": true + }, + { + "name": "laminas/laminas-mvc-i18n", + "constraint": "^1.0", + "prompt": "Would you like to install i18n support?", + "module": true + }, + { + "name": "laminas/laminas-test", + "constraint": "^3.0.2", + "prompt": "Would you like to install MVC testing support?", + "dev": true + } + ] + } +} +``` + +The above will: + +* Prompt if you want to do a minimal install; if so, the plugin will remove + the `extra.laminas-skeleton-installer` section on completion, and then delete + itself from the installation. +* Prompt for each of the listed components, as noted, awaiting a y/n + answer (with "n" as the default). +* Install the selections, updating the `composer.json`. +* Remove itself from the installation on completion. diff --git a/mkdocs.yml b/mkdocs.yml index cb84b6c..6f8664a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -3,7 +3,8 @@ site_dir: docs/html nav: - Home: index.md site_name: laminas-skeleton-installer -site_description: 'Skeleton Installer: Composer plugin for initial laminas-mvc-skeleton application installation' +site_description: 'Composer plugin for providing and prompting for optional components in skeleton projects.' repo_url: 'https://github.com/laminas/laminas-skeleton-installer' extra: project: Components + show_special_homepage: true