Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(packages): add missing READMES to packages #545

Merged
merged 1 commit into from
Jul 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/add/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the user some question about which properties to add


## Installation

Expand Down
27 changes: 27 additions & 0 deletions packages/generate-loader/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# webpack-cli generate-loader

## Description

This package contains the logic to initiate new loader projects.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initiate => create
Simpler wording


## 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should always split installation and usage of the packages in local and global:

npx webpack-cli generate-loader

and

webpack-cli generate-loader

In this file we mixed, which is confusing for the user

```
26 changes: 26 additions & 0 deletions packages/generate-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# webpack-cli generate-plugin

## Description

This package contains the logic to initiate new plugin projects.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initiate => create


## 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
```
34 changes: 34 additions & 0 deletions packages/generators/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# webpack-cli generators

## Description

This package contains all webpack-cli related yeoman generators.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should explain what the generators do


## 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
```
3 changes: 2 additions & 1 deletion packages/info/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -13,6 +13,7 @@ npm i -D @webpack-cli/info
## Usage

### Node

```js
const envinfo = require("@webpack-cli/info");
envinfo();
Expand Down
32 changes: 32 additions & 0 deletions packages/init/README.md
Original file line number Diff line number Diff line change
@@ -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
```
26 changes: 26 additions & 0 deletions packages/make/README.md
Original file line number Diff line number Diff line change
@@ -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
```
28 changes: 28 additions & 0 deletions packages/migrate/README.md
Original file line number Diff line number Diff line change
@@ -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
```
26 changes: 26 additions & 0 deletions packages/remove/README.md
Original file line number Diff line number Diff line change
@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the user some question about which


## 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
```
26 changes: 26 additions & 0 deletions packages/serve/README.md
Original file line number Diff line number Diff line change
@@ -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
```
26 changes: 26 additions & 0 deletions packages/update/README.md
Original file line number Diff line number Diff line change
@@ -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
```
29 changes: 29 additions & 0 deletions packages/utils/README.md
Original file line number Diff line number Diff line change
@@ -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
```