diff --git a/packages/add/README.md b/packages/add/README.md index ecb082ed3a6..aca6824f5a7 100644 --- a/packages/add/README.md +++ b/packages/add/README.md @@ -2,7 +2,7 @@ ## Description -This package contains the logic to add new properties to the a webpack configuration file. It will run a generator that prompts the user for questions of which property to add to their webpack configuration file. +This package contains the logic to add new properties in a webpack configuration file. It will run a generator that prompts the user for questions of which property to add to their webpack configuration file. ## Installation diff --git a/packages/generate-loader/README.md b/packages/generate-loader/README.md new file mode 100644 index 00000000000..1e4cf2caa93 --- /dev/null +++ b/packages/generate-loader/README.md @@ -0,0 +1,27 @@ +# webpack-cli generate-loader + +## Description + +This package contains the logic to initiate new loader projects. + +## Installation + +```bash +npm i -D webpack-cli @webpack-cli/generate-loader +``` + +## Usage + +To run the package programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli. + +### Node + +```js +const generateLoader = require("@webpack-cli/generate-loader"); +generateLoader(); +``` + +### CLI (via `webpack-cli`) +```bash +npx webpack-cli generate-loader +``` \ No newline at end of file diff --git a/packages/generate-plugin/README.md b/packages/generate-plugin/README.md new file mode 100644 index 00000000000..122bb448208 --- /dev/null +++ b/packages/generate-plugin/README.md @@ -0,0 +1,26 @@ +# webpack-cli generate-plugin + +## Description + +This package contains the logic to initiate new plugin projects. + +## Installation + +```bash +npm i -D webpack-cli @webpack-cli/generate-plugin +``` + +## Usage + +To run the package programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli. + +### Node +```js +const generatePlugin = require("@webpack-cli/generate-plugin"); +generatePlugin(); +``` + +### CLI (via `webpack-cli`) +```bash +npx webpack-cli generate-plugin +``` \ No newline at end of file diff --git a/packages/generators/README.md b/packages/generators/README.md new file mode 100644 index 00000000000..31f91878574 --- /dev/null +++ b/packages/generators/README.md @@ -0,0 +1,34 @@ +# webpack-cli generators + +## Description + +This package contains all webpack-cli related yeoman generators. + +## Installation + +```bash +npm i -D webpack-cli @webpack-cli/generators +``` + +## Usage + +To run the package programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli. + +## Generators + +- Plugin Generator +- Remove Generator +- Update Generator +- Loader Generator +- Init Generator +- Add Generator + + +### Node + +```js +const { addGenerator, addonGenerator, initGenerator, loaderGenerator, + pluginGenerator, removeGenerator, updateGenerator + } = require("@webpack-cli/generators"); + // ... compose with yeoman env or add a generator to your own yeoman project +``` \ No newline at end of file diff --git a/packages/info/README.md b/packages/info/README.md index 1948f1ba01d..ceaf3eeb61d 100644 --- a/packages/info/README.md +++ b/packages/info/README.md @@ -2,7 +2,7 @@ ## Description -It returns a set of information related to the local enviroment. +This pacakge returns a set of information related to the local enviroment. ## Installation @@ -13,6 +13,7 @@ npm i -D @webpack-cli/info ## Usage ### Node + ```js const envinfo = require("@webpack-cli/info"); envinfo(); diff --git a/packages/init/README.md b/packages/init/README.md new file mode 100644 index 00000000000..932e619d912 --- /dev/null +++ b/packages/init/README.md @@ -0,0 +1,32 @@ +# webpack-cli init + +## Description + +This package contains the logic to create a new webpack configuration. + +## Installation + +```bash +npm i -D webpack-cli @webpack-cli/init +``` + +## Usage + +To run the package programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli. + +### Node + +```js +const init = require("@webpack-cli/init"); + +// this will run the default init instance +init(); + + // we're slicing node.process, ...myPacakges is a webpack-scaffold name/path +init([null, null, ...myPacakges]); +``` + +### CLI (via `webpack-cli`) +```bash +npx webpack-cli init +``` \ No newline at end of file diff --git a/packages/make/README.md b/packages/make/README.md new file mode 100644 index 00000000000..82dfba3ce35 --- /dev/null +++ b/packages/make/README.md @@ -0,0 +1,26 @@ +# webpack-cli make (Work in Progress, not yet published) + +## Description + +This package contains the logic to run a makefile command similar to C in webpack. + +## Installation + +```bash +npm i -D webpack-cli @webpack-cli/make +``` + +## Usage + +To run the package programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli. + +### Node +```js +const make = require("@webpack-cli/make"); +make(); +``` + +### CLI (via `webpack-cli`) +```bash +npx webpack-cli make +``` \ No newline at end of file diff --git a/packages/migrate/README.md b/packages/migrate/README.md new file mode 100644 index 00000000000..0762bd00f2b --- /dev/null +++ b/packages/migrate/README.md @@ -0,0 +1,28 @@ +# webpack-cli migrate + +## Description + +This package contains the logic to migrate a project from one version to the other. + +## Installation + +```bash +npm i -D webpack-cli @webpack-cli/migrate +``` + +## Usage + +To run the package programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli. + +### Node +```js +const migrate = require("@webpack-cli/migrate"); + +// add null to mock process.env +migrate(null, null, inputPath, outputPath); +``` + +### CLI (via `webpack-cli`) +```bash +npx webpack-cli migrate +``` \ No newline at end of file diff --git a/packages/remove/README.md b/packages/remove/README.md new file mode 100644 index 00000000000..46036ea9b4f --- /dev/null +++ b/packages/remove/README.md @@ -0,0 +1,26 @@ +# webpack-cli remove + +## Description + +This package contains the logic to remove properties of a webpack configuration file. It will run a generator that prompts the user for questions of which property to remove in their webpack configuration file. + +## Installation + +```bash +npm i -D webpack-cli @webpack-cli/remove +``` + +## Usage + +To run the scaffolding instance programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli. + +### Node +```js +const remove = require("@webpack-cli/remove"); +remove(); +``` + +### CLI (via `webpack-cli`) +```bash +npx webpack-cli remove +``` \ No newline at end of file diff --git a/packages/serve/README.md b/packages/serve/README.md new file mode 100644 index 00000000000..29b9e698386 --- /dev/null +++ b/packages/serve/README.md @@ -0,0 +1,26 @@ +# webpack-cli serve + +## Description + +This package contains the logic to run webpack-serve without using webpack-serve directly. + +## Installation + +```bash +npm i -D webpack-cli @webpack-cli/serve +``` + +## Usage + +To run the scaffolding instance programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli. + +### Node +```js +const serve = require("@webpack-cli/serve"); +serve(); +``` + +### CLI (via `webpack-cli`) +```bash +npx webpack-cli serve +``` \ No newline at end of file diff --git a/packages/update/README.md b/packages/update/README.md new file mode 100644 index 00000000000..9dd3b3992b0 --- /dev/null +++ b/packages/update/README.md @@ -0,0 +1,26 @@ +# webpack-cli update + +## Description + +This package contains the logic to update properties in a webpack configuration file. It will run a generator that prompts the user for questions of which property to update in their webpack configuration file. + +## Installation + +```bash +npm i -D webpack-cli @webpack-cli/update +``` + +## Usage + +To run the scaffolding instance programmatically, install it as a dependency. When using the package programmatically, one does not have to install webpack-cli. + +### Node +```js +const update = require("@webpack-cli/update"); +update(); +``` + +### CLI (via `webpack-cli`) +```bash +npx webpack-cli update +``` \ No newline at end of file diff --git a/packages/utils/README.md b/packages/utils/README.md new file mode 100644 index 00000000000..33bc3f771f6 --- /dev/null +++ b/packages/utils/README.md @@ -0,0 +1,29 @@ +# webpack-cli utils (WIP, not yet published) + +## Description + +This package contains the utilities used across the webpack-cli repositories. + +## Installation + +```bash +npm i -D webpack-cli @webpack-cli/utils +``` + +## Contents + - AST transformations + - Checking NPM registry + - A Recursive AST parser + - Checking Local Configurations + - Yeoman Generator Adapter + - Package Resolver + - Test Utilities for Jest + +## Usage + +### Node + +```js +const utils = require("@webpack-cli/utils"); +// API yet to be exposed +``` \ No newline at end of file