Skip to content

[WIP] feat(api/plugins): create plugins api documentation #242

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

Closed
Closed
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
3 changes: 3 additions & 0 deletions content/api/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: API
sort: 0
contributors:
- TheLarkInn
---

TODO
Expand Down
76 changes: 76 additions & 0 deletions content/api/instances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: Tapable Instances
contributors:
- TheLarkInn
sort: 2
---

**Tapable Instances** are classes in the webpack source code which have been extended or mixed in from class `Tapable`. For more information on `Tapable` visit the [tapable repository](https://github.com/webpack/tapable) or visit the [plugins overview](./plugins#tapable)
Copy link

Choose a reason for hiding this comment

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

Can I put in Tapable description from #36 here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes that's fine.


## Compiler

`environment()`

`after-environment()`

`before-run(compiler: Compiler, callback)`

`run(callback)`

`watch-run(watching: Watching, callback)`

`normal-module-factory(normalModuleFactory: NormalModuleFactory)`

`context-module-factory(contextModuleFactory: ContextModuleFactory)`

`compilation(compilation: Compilation, params: Object)`

`this-compilation(compilation: Compilation, params: Object)`

`after-plugins(compiler: Compiler)`

`after-resolvers(compiler: Compiler)`

`should-emit(compilation: Compilation)`

`emit(compilation: Compilation, callback)`

`after-emit(compilation: Compilation, callback)`

`done(stats: Stats)`

`additional-pass(callback)`

`failed(err: Error)`

`invalid(fileName: string, changeTime)`

`entry-option(context, entry)`


## MultiCompiler

## Compilation

## ContextModuleFactory

## NormalModuleFactory

## DllModuleFactory

## MultiModuleFactory

## Resolver

## Template

## ChunkTemplate

## HotUpdateChunkTemplate

## MainTemplate

## ModuleTemplate

## Parser

10 changes: 10 additions & 0 deletions content/api/plugins.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
---
title: Plugin API
contributors:
- TheLarkInn
sort: 1
---

## Tapable

## How is a plugin created?

## What is the shape of a plugin?