From ef4033f000c4f097e5b234f2bd026bd391086603 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sun, 21 Apr 2019 16:42:18 +0530 Subject: [PATCH 1/3] docs(readme): fix typos, add summary of all commands fix typos, add summary of all commands in commands section --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8e5a30b157b..3ac7dca95c4 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ - [How to install](#how-to-install) * [Getting Started](#getting-started) * [webpack CLI Scaffolds](#webpack-cli-scaffolds) -* Commands +* [Commands](#commands) - [`webpack-cli init`](./packages/init/README.md#webpack-cli-init) - [`webpack-cli add`](./packages/add/README.md#webpack-cli-add) - [`webpack-cli info`](./packages/info/README.md#webpack-cli-info) @@ -52,22 +52,32 @@ Otherwise `npm install --save-dev webpack-cli` or `yarn add webpack-cli --dev` w ### Commands -Supporting developers is an important task for webpack CLI. Thus, webpack CLI provides different commands for many common tasks. We organize webpack CLI as a [multi-package repository](https://github.com/lerna/lerna). Every command has a dedicated subfolder in the `packages` Folder. +Supporting developers is an important task for webpack CLI. Thus, webpack CLI provides different commands for many common tasks. We organize webpack CLI as a [multi-package repository](https://github.com/lerna/lerna). Every command has a dedicated subfolder in the `packages` Folder. Here's a summary of commands provided by the CLI. + +- [`webpack-cli init`](./packages/init/README.md#webpack-cli-init) - Create a new webpack configuration. +- [`webpack-cli add`](./packages/add/README.md#webpack-cli-add) - Add new properties to a webpack configuration file. +- [`webpack-cli info`](./packages/info/README.md#webpack-cli-info) - Returns information related to the local environment. +- [`webpack-cli migrate`](./packages/migrate/README.md#webpack-cli-migrate) - Migrate project from one version to another. +- [`webpack-cli remove`](./packages/remove/README.md#webpack-cli-remove) - Remove properties from a webpack configuration file. +- [`webpack-cli generate-plugin`](./packages/generate-plugin/README.md#webpack-cli-generate-plugin) - Initiate new plugin project. +- [`webpack-cli generate-loader`](./packages/generate-loader/README.md#webpack-cli-generate-loader) - Initiate new loader project. +- [`webpack-cli serve`](./packages/serve/README.md#webpack-cli-serve) - Use webpack with a development server that provides live reloading. +- [`webpack-cli update`](./packages/update/README.md#webpack-cli-update) - Update properties in a webpack configuration file. ## Getting started -When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed! Otherwise, you would need to install webpack CLI and the packages you want to use. If we want to use the `init` functionality to create a new `webpack.config.js` configuration file: +When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed! Otherwise, you would need to install webpack CLI and the packages you want to use. If we want to use the `init` command to create a new `webpack.config.js` configuration file: ```sh npm i webpack-cli @webpack-cli/init npx webpack-cli init ``` -You will answer many questions when running the `init` so webpack CLI can provide the best fitting configuration. +You will be prompted for several questions about what how you want to generate your config file when running the `init` command so webpack CLI can provide the best fitting configuration. ## webpack CLI Scaffolds -With v3 of webpack CLI, we introduced scaffolding as an integral part of the CLI. Our goal is to simplify the creation of webpack configurations for different purposes. Additionally, sharing such solutions with the community is beneficial and with webpack webpack's we want to allow this. We provide `webpack-scaffold` as a utility suite for creating these scaffolds. It contains functions that could be of use for creating an scaffold yourself. +With v3 of webpack CLI, we introduced scaffolding as an integral part of the CLI. Our goal is to simplify the creation of webpack configurations for different purposes. Additionally, sharing such solutions with the community is beneficial and with webpack we want to allow this. We provide `webpack-scaffold` as a utility suite for creating these scaffolds. It contains functions that could be of use for creating a scaffold yourself. You can read more about [Scaffolding](https://webpack.js.org/guides/scaffolding), learn [How to compose a webpack-scaffold?](https://webpack.js.org/contribute/writing-a-scaffold) or generate one with [webpack-scaffold-starter](https://github.com/rishabh3112/webpack-scaffold-starter). From 2a1fc1b2e80f1125a898bc06a2bedd2367a0a10a Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sun, 21 Apr 2019 18:45:58 +0530 Subject: [PATCH 2/3] docs(readme): remove commands list in the beginning remove commands list from the beginning --- README.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/README.md b/README.md index 3ac7dca95c4..9c40f7afe66 100644 --- a/README.md +++ b/README.md @@ -28,15 +28,6 @@ * [Getting Started](#getting-started) * [webpack CLI Scaffolds](#webpack-cli-scaffolds) * [Commands](#commands) - - [`webpack-cli init`](./packages/init/README.md#webpack-cli-init) - - [`webpack-cli add`](./packages/add/README.md#webpack-cli-add) - - [`webpack-cli info`](./packages/info/README.md#webpack-cli-info) - - [`webpack-cli migrate`](./packages/migrate/README.md#webpack-cli-migrate) - - [`webpack-cli remove`](./packages/remove/README.md#webpack-cli-remove) - - [`webpack-cli generate-plugin`](./packages/generate-plugin/README.md#webpack-cli-generate-plugin) - - [`webpack-cli generate-loader`](./packages/generate-loader/README.md#webpack-cli-generate-loader) - - [`webpack-cli serve`](./packages/serve/README.md#webpack-cli-serve) - - [`webpack-cli update`](./packages/update/README.md#webpack-cli-update) * [webpack.config.js](https://webpack.js.org/concepts/configuration/) * [Contributing and Internal Documentation](#contributing-and-internal-documentation) @@ -73,7 +64,7 @@ npm i webpack-cli @webpack-cli/init npx webpack-cli init ``` -You will be prompted for several questions about what how you want to generate your config file when running the `init` command so webpack CLI can provide the best fitting configuration. +You will be prompted for some questions about what how you want to generate your config file when running the `init` command so webpack CLI can provide the best fitting configuration. ## webpack CLI Scaffolds From 9117655ce407663d478044be7925249fa894bd89 Mon Sep 17 00:00:00 2001 From: Anshuman Verma Date: Sun, 21 Apr 2019 22:11:22 +0530 Subject: [PATCH 3/3] docs(docs): include util packages include util packages --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c40f7afe66..381f5610cd1 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,13 @@ When you have followed the [Getting Started](https://webpack.js.org/guides/getti Otherwise `npm install --save-dev webpack-cli` or `yarn add webpack-cli --dev` will install it. +## Packages + +We organize webpack CLI as a multi-package repository using [lerna](https://github.com/lerna/lerna). Every command has a dedicated subfolder in the `packages` Folder. Here's a summary of commands provided by the CLI. + ### Commands -Supporting developers is an important task for webpack CLI. Thus, webpack CLI provides different commands for many common tasks. We organize webpack CLI as a [multi-package repository](https://github.com/lerna/lerna). Every command has a dedicated subfolder in the `packages` Folder. Here's a summary of commands provided by the CLI. +Supporting developers is an important task for webpack CLI. Thus, webpack CLI provides different commands for many common tasks. - [`webpack-cli init`](./packages/init/README.md#webpack-cli-init) - Create a new webpack configuration. - [`webpack-cli add`](./packages/add/README.md#webpack-cli-add) - Add new properties to a webpack configuration file. @@ -55,6 +59,15 @@ Supporting developers is an important task for webpack CLI. Thus, webpack CLI pr - [`webpack-cli serve`](./packages/serve/README.md#webpack-cli-serve) - Use webpack with a development server that provides live reloading. - [`webpack-cli update`](./packages/update/README.md#webpack-cli-update) - Update properties in a webpack configuration file. +### Utilities + +The project also has several utility packages which are used by other commands + +- [`utils`](./packages/utils/README.md) - Several utilities used across webpack-cli. +- [`generators`](./packages/generators/README.md) - Contains all webpack-cli related yeoman generators. +- [`webpack-scaffold`](./packages/info/README.md#webpack-cli-info) - Utilities to create a webpack scaffold. + + ## Getting started When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed! Otherwise, you would need to install webpack CLI and the packages you want to use. If we want to use the `init` command to create a new `webpack.config.js` configuration file: