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

chore(docs): Refactors links for badges #859

Merged
merged 4 commits into from May 4, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
83 changes: 50 additions & 33 deletions README.md
Expand Up @@ -11,25 +11,24 @@
</p>
<br>

[![npm](https://img.shields.io/npm/v/webpack-cli.svg)](https://www.npmjs.com/package/webpack-cli)
[![Build Status](https://travis-ci.org/webpack/webpack-cli.svg)](https://travis-ci.org/webpack/webpack-cli)
[![Build2 Status](https://dev.azure.com/webpack/webpack/_apis/build/status/webpack.webpack-cli)](https://dev.azure.com/webpack/webpack/_build/latest?definitionId=4)
[![npm][npm]][npm-url]
[![Build Status][build-status]][build-status-url]
[![Build2 Status][build-status-azure]][build-status-azure-url]
[![deps][deps]][deps-url]
[![Code Climate](https://codeclimate.com/github/webpack/webpack-cli/badges/gpa.svg)](https://codeclimate.com/github/webpack/webpack-cli)
[![chat on gitter](https://badges.gitter.im/webpack/webpack.svg)](https://gitter.im/webpack/webpack)
[![Install Size](https://packagephobia.now.sh/badge?p=webpack-cli)](https://packagephobia.now.sh/result?p=webpack-cli)
[![npm](https://img.shields.io/npm/dw/webpack-cli.svg)](https://www.npmjs.com/package/webpack-cli)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)
[![GitHub contributors](https://img.shields.io/github/contributors/webpack/webpack-cli.svg)](https://github.com/webpack/webpack-cli/graphs/contributors)


* [About](#about)
- [How to install](#how-to-install)
* [Getting Started](#getting-started)
* [webpack CLI Scaffolds](#webpack-cli-scaffolds)
* [Commands](#commands)
* [webpack.config.js](https://webpack.js.org/concepts/configuration/)
* [Contributing and Internal Documentation](#contributing-and-internal-documentation)
[![Code Climate][maintainability]][maintainability-url]
[![chat on gitter][chat]][chat-url]
[![Install Size][size]][size-url]
[![Downloads][downloads]][downloads-url]
[![lerna][lerna]][lerna-url]
[![GitHub contributors][contributors]][contributors-url]

- [About](#about)
- [How to install](#how-to-install)
- [Getting Started](#getting-started)
- [webpack CLI Scaffolds](#webpack-cli-scaffolds)
- [Commands](#commands)
- [webpack.config.js](https://webpack.js.org/concepts/configuration/)
- [Contributing and Internal Documentation](#contributing-and-internal-documentation)

## About

Expand All @@ -39,7 +38,7 @@ webpack CLI provides a flexible set of commands for developers to increase speed

When you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed!

Otherwise `npm install --save-dev webpack-cli` or `yarn add webpack-cli --dev` will install it.
Otherwise `npm install --save-dev webpack-cli` or `yarn add webpack-cli --dev` will install it.

## Packages

Expand All @@ -49,24 +48,23 @@ We organize webpack CLI as a multi-package repository using [lerna](https://gith

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.
- [`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.
- [`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.

### 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.

- [`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

Expand All @@ -77,7 +75,7 @@ npm i webpack-cli @webpack-cli/init
npx webpack-cli init
```

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.
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

Expand All @@ -89,5 +87,24 @@ You can read more about [Scaffolding](https://webpack.js.org/guides/scaffolding)

The webpack family welcomes any contributor, small or big. We are happy to elaborate, guide you through the source code and find issues you might want to work on! To get started have a look at our [documentation on contributing](./.github/CONTRIBUTING.md).

[build-status]: https://travis-ci.org/webpack/webpack-cli.svg
[build-status-url]: https://travis-ci.org/webpack/webpack-cli
[build-status-azure]: https://dev.azure.com/webpack/webpack/_apis/build/status/webpack.webpack-cli
[build-status-azure-url]: https://dev.azure.com/webpack/webpack/_build/latest?definitionId=4
[chat]: https://badges.gitter.im/webpack/webpack.svg
[chat-url]: https://gitter.im/webpack/webpack
[contributors]: https://img.shields.io/github/contributors/webpack/webpack-cli.svg
[contributors-url]:https://github.com/webpack/webpack-cli/graphs/contributors
[deps]: https://img.shields.io/david/webpack/webpack.svg
[deps-url]: https://david-dm.org/webpack/webpack-cli
[downloads]: https://img.shields.io/npm/dw/webpack-cli.svg
[downloads-url]: https://www.npmjs.com/package/webpack-cli
[lerna]: https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg

[lerna-url]:http://www.lernajs.io/
[npm]: https://img.shields.io/npm/v/webpack-cli.svg
[npm-url]: https://www.npmjs.com/package/webpack-cli
[maintainability]: https://codeclimate.com/github/webpack/webpack-cli/badges/gpa.svg
[maintainability-url]: https://codeclimate.com/github/webpack/webpack-cli
[size]: https://packagephobia.now.sh/badge?p=webpack-cli
[size-url]:https://packagephobia.now.sh/result?p=webpack-cli
8 changes: 7 additions & 1 deletion packages/README.md
@@ -1,10 +1,12 @@
# webpack-cli Packages

## Description

webpack CLI hosts several standalone packages apart from the main package that focuses on the solving respective smaller use cases.
This folder is the collection of those packages.

## Packages

1. [add](https://github.com/webpack/webpack-cli/tree/master/packages/add)
2. [generate-loader](https://github.com/webpack/webpack-cli/tree/master/packages/generate-loader)
3. [generate-plugin](https://github.com/webpack/webpack-cli/tree/master/packages/generate-plugin)
Expand All @@ -20,15 +22,19 @@ This folder is the collection of those packages.
13. [webpack-scaffold](https://github.com/webpack/webpack-cli/tree/master/packages/webpack-scaffold)

## Generic Installation

1. Standalone installation of packages

```shell
npm install @webpack-cli/<package>
```

2. Installation of respective `package` with `webpack-cli` [Recommended]

```shell
npm install webpack-cli @webpack-cli/<package>
```

----
---

[Back to webpack-cli](https://github.com/webpack/webpack-cli)
5 changes: 4 additions & 1 deletion packages/add/README.md
@@ -1,6 +1,6 @@
# webpack-cli add

[![npm](https://img.shields.io/npm/dm/@webpack-cli/add.svg)](https://www.npmjs.com/package/@webpack-cli/add)
[![NPM downloads][downloads]][downloads-url]

## Description

Expand Down Expand Up @@ -34,3 +34,6 @@ add();
```bash
npx webpack-cli add
```

[downloads]: https://img.shields.io/npm/dm/@webpack-cli/add.svg
[downloads-url]: https://www.npmjs.com/package/@webpack-cli/add
6 changes: 5 additions & 1 deletion packages/generate-loader/README.md
@@ -1,6 +1,6 @@
# webpack-cli generate-loader

[![npm](https://img.shields.io/npm/dm/@webpack-cli/generate-loader.svg)](https://www.npmjs.com/package/@webpack-cli/generate-loader)
[![NPM Downloads][downloads]][downloads-url]

## Description

Expand All @@ -24,6 +24,10 @@ generateLoader();
```

### CLI (via `webpack-cli`)

```bash
npx webpack-cli generate-loader
```

[downloads]: https://img.shields.io/npm/dm/@webpack-cli/generate-loader.svg
[downloads-url]: https://www.npmjs.com/package/@webpack-cli/generate-loader
7 changes: 6 additions & 1 deletion packages/generate-plugin/README.md
@@ -1,6 +1,6 @@
# webpack-cli generate-plugin

[![npm](https://img.shields.io/npm/dm/@webpack-cli/generate-plugin.svg)](https://www.npmjs.com/package/@webpack-cli/generate-plugin)
[![NPM Downloads][downloads]][downloads-url]

## Description

Expand All @@ -17,12 +17,17 @@ npm i -D webpack-cli @webpack-cli/generate-plugin
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").default;
generatePlugin();
```

### CLI (via `webpack-cli`)

```bash
npx webpack-cli generate-plugin
```

[downloads]: https://img.shields.io/npm/dm/@webpack-cli/generate-plugin.svg
[downloads-url]: https://www.npmjs.com/package/@webpack-cli/generate-plugin
38 changes: 25 additions & 13 deletions packages/generators/README.md
@@ -1,10 +1,10 @@
# webpack-cli generators

[![npm](https://img.shields.io/npm/dm/@webpack-cli/generators.svg)](https://www.npmjs.com/package/@webpack-cli/generators)
[![NPM Downloads][downloads]][downloads-url]

## Description

This package contains all webpack-cli related yeoman generators.
This package contains all webpack-cli related yeoman generators.

## Installation

Expand All @@ -19,19 +19,31 @@ To run the package programmatically, install it as a dependency. When using the
### 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
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
```

## Generators

- [**Plugin Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/plugin-generator.ts) : Creates a webpack plugin project, add starter plugin code and runs `webpack-defaults`
- [**Remove Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/remove-generator.ts) : Removes properties from webpack configurations
- [**Update Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/update-generator.ts) : [WIP] Updates properties of webpack configurations
- [**Loader Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/loader-generator.ts) : Creates a webpack loader project, add starter loader code and runs `webpack-defaults`
- [**Init Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/init-generator.ts) : Generates new webapck configuration as per user requirements
- [**Add Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/add-generator.ts) : Add properties to webpack configurations
- [**Addon Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/addon-generator.ts) : Generates a webpack project conforming to `webpack-defaults`
- [**Plugin Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/plugin-generator.ts) : Creates a webpack plugin project, add starter plugin code and runs `webpack-defaults`
- [**Remove Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/remove-generator.ts) : Removes properties from webpack configurations
- [**Update Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/update-generator.ts) : [WIP] Updates properties of webpack configurations
- [**Loader Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/loader-generator.ts) : Creates a webpack loader project, add starter loader code and runs `webpack-defaults`
- [**Init Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/init-generator.ts) : Generates new webapck configuration as per user requirements
- [**Add Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/add-generator.ts) : Add properties to webpack configurations
- [**Addon Generator**](https://github.com/webpack/webpack-cli/blob/master/packages/generators/addon-generator.ts) : Generates a webpack project conforming to `webpack-defaults`

---

[Back to Packages](https://github.com/webpack/webpack-cli/tree/master/packages)

[downloads]: https://img.shields.io/npm/dm/@webpack-cli/generators.svg
[downloads-url]: https://www.npmjs.com/package/@webpack-cli/generators
6 changes: 5 additions & 1 deletion packages/info/README.md
@@ -1,6 +1,6 @@
# webpack-cli info

[![npm](https://img.shields.io/npm/dm/@webpack-cli/info.svg)](https://www.npmjs.com/package/@webpack-cli/info)
[![NPM Downloads][downloads]][downloads-url]

## Description

Expand All @@ -22,6 +22,10 @@ envinfo();
```

### CLI (via `webpack-cli`)

```bash
npx webpack-cli info
```

[downloads]: https://img.shields.io/npm/dm/@webpack-cli/info.svg
[downloads-url]: https://www.npmjs.com/package/@webpack-cli/info
11 changes: 9 additions & 2 deletions packages/init/README.md
@@ -1,6 +1,6 @@
# webpack-cli init

[![npm](https://img.shields.io/npm/dm/@webpack-cli/init.svg)](https://www.npmjs.com/package/@webpack-cli/init)
[![NPM Downloads][downloads]][downloads-url]

## Description

Expand All @@ -24,24 +24,31 @@ const init = require("@webpack-cli/init").default;
// this will run the default init instance
init();

// we're slicing node.process, ...myPacakges is a webpack-scaffold name/path
// we're slicing node.process, ...myPacakges is a webpack-scaffold name/path
init([null, null, ...myPacakges]);
```

### CLI (via `webpack-cli`)

**Via defaults**

```bash
npx webpack-cli init
```

**Via custom scaffold**

1. Using package on `npm`

```bash
npx webpack-cli init webpack-scaffold-[name]
```

2. Using path to local directory

```bash
npx webpack-cli init [path]
```

[downloads]: https://img.shields.io/npm/dm/@webpack-cli/init.svg
[downloads-url]: https://www.npmjs.com/package/@webpack-cli/init
7 changes: 6 additions & 1 deletion packages/migrate/README.md
@@ -1,6 +1,6 @@
# webpack-cli migrate

[![npm](https://img.shields.io/npm/dm/@webpack-cli/migrate.svg)](https://www.npmjs.com/package/@webpack-cli/migrate)
[![npm][downloads]][downloads-url]

## Description

Expand All @@ -17,6 +17,7 @@ npm i -D webpack-cli @webpack-cli/migrate
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").default;

Expand All @@ -25,6 +26,10 @@ migrate(null, null, inputPath, outputPath);
```

### CLI (via `webpack-cli`)

```bash
npx webpack-cli migrate
```

[downloads]: https://img.shields.io/npm/dm/@webpack-cli/migrate.svg
[downloads-url]: https://www.npmjs.com/package/@webpack-cli/migrate
9 changes: 7 additions & 2 deletions packages/remove/README.md
@@ -1,10 +1,10 @@
# webpack-cli remove

[![npm](https://img.shields.io/npm/dm/@webpack-cli/remove.svg)](https://www.npmjs.com/package/@webpack-cli/remove)
[![NPM Downloads][downloads]][downloads-url]

## 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.
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

Expand All @@ -17,12 +17,17 @@ npm i -D webpack-cli @webpack-cli/remove
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").default;
remove();
```

### CLI (via `webpack-cli`)

```bash
npx webpack-cli remove
```

[downloads]: https://img.shields.io/npm/dm/@webpack-cli/remove.svg
[downloads-url]: https://www.npmjs.com/package/@webpack-cli/remove