-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
## 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
``` |
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
## 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 | ||
``` |
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should explain what the |
||
|
||
## 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 | ||
``` |
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 | ||
``` |
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 | ||
``` |
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 | ||
``` |
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
## 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 | ||
``` |
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 | ||
``` |
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 | ||
``` |
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 | ||
``` |
There was a problem hiding this comment.
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